@Deprecated public interface WorkspaceNode<K,V>
Node
that is to be copied into a TransactionWorkspace
for optimistically locked
nodes. Adds versioning and dirty flags over conventional Nodes.
Typically used when the cache mode configured is Configuration.NodeLockingScheme.OPTIMISTIC
Modifier and Type | Method and Description |
---|---|
void |
addChild(WorkspaceNode<K,V> workspaceNode)
Deprecated.
Adds a given WorkspaceNode to the current node's child map
|
void |
clearData()
Deprecated.
|
NodeSPI |
createChild(Object child_name,
NodeSPI<K,V> parent,
CacheSPI<K,V> cache,
DataVersion version)
Deprecated.
Creates a child node.
|
V |
get(K key)
Deprecated.
|
NodeSPI<K,V> |
getChildDirect(Fqn f)
Deprecated.
|
NodeSPI<K,V> |
getChildDirect(Object o)
Deprecated.
|
Set<Object> |
getChildrenNames()
Deprecated.
|
Map<K,V> |
getData()
Deprecated.
|
Fqn |
getFqn()
Deprecated.
|
Set<K> |
getKeys()
Deprecated.
|
List<Set<Fqn>> |
getMergedChildren()
Deprecated.
Returns 2 Sets - a set of children added (first set) and a set of children removed.
|
Map<K,V> |
getMergedData()
Deprecated.
Attempts to merge data changed during the current transaction with the data in the underlying tree.
|
NodeSPI<K,V> |
getNode()
Deprecated.
Retrieves a reference to the underlying
NodeSPI instance. |
TransactionWorkspace |
getTransactionWorkspace()
Deprecated.
Retrieves a TransactionWorkspace instance associated with the current transaction, which the current WorkspaceNode instance
lives in.
|
DataVersion |
getVersion()
Deprecated.
Retrieves the data version of the in-memory node.
|
boolean |
isChildrenLoaded()
Deprecated.
|
boolean |
isChildrenModified()
Deprecated.
|
boolean |
isCreated()
Deprecated.
|
boolean |
isDirty()
Deprecated.
A convenience method that returns whether a node is dirty, i.e., it has been created, deleted or modified.
|
boolean |
isModified()
Deprecated.
A node is considered modified if its data map has changed.
|
boolean |
isRemoved()
Deprecated.
|
boolean |
isResurrected()
Deprecated.
|
boolean |
isVersioningImplicit()
Deprecated.
Tests whether versioning for the WorkspaceNode instance in the current transaction is implicit (i.e., using
DefaultDataVersion
rather than a custom DataVersion passed in using Option.setDataVersion(DataVersion) ) |
void |
markAsCreated()
Deprecated.
Marks the instance as having been created in the current transaction.
|
void |
markAsRemoved(boolean marker,
boolean recursive)
Deprecated.
|
void |
markAsResurrected(boolean resurrected)
Deprecated.
Marks a node as resurrected, i.e., deleted and created again within the same transaction
|
V |
put(K key,
V value)
Deprecated.
|
void |
putAll(Map<K,V> data)
Deprecated.
|
V |
remove(K removeKey)
Deprecated.
|
boolean |
removeChild(Object nodeName)
Deprecated.
|
void |
setRemoved(boolean marker)
Deprecated.
|
void |
setVersion(DataVersion version)
Deprecated.
Sets the data version of this workspace node.
|
void |
setVersioningImplicit(boolean b)
Deprecated.
Sets whether versioning for the WorkspaceNode instance in the current transaction is implicit (i.e., using
DefaultDataVersion
rather than a custom DataVersion passed in using Option.setDataVersion(DataVersion) ) |
Fqn getFqn()
List<Set<Fqn>> getMergedChildren()
DataVersion getVersion()
void setVersion(DataVersion version)
version
- a DataVersion
implementation.boolean isModified()
isChildrenModified()
.boolean isDirty()
isChildrenModified()
Map<K,V> getMergedData()
NodeSPI<K,V> getNode()
NodeSPI
instance.TransactionWorkspace getTransactionWorkspace()
boolean isCreated()
void markAsCreated()
NodeSPI createChild(Object child_name, NodeSPI<K,V> parent, CacheSPI<K,V> cache, DataVersion version)
child_name
- Object name of the child to createparent
- A reference to the parent nodecache
- CacheSPI instance to create this node inversion
- DataVersion to apply to the child. If null, DefaultDataVersion.ZERO
will be used.boolean isVersioningImplicit()
DefaultDataVersion
rather than a custom DataVersion
passed in using Option.setDataVersion(DataVersion)
)void setVersioningImplicit(boolean b)
DefaultDataVersion
rather than a custom DataVersion
passed in using Option.setDataVersion(DataVersion)
)b
- set to true if versioning is implicit, false otherwise.NodeSPI<K,V> getChildDirect(Object o)
o
- node nameNodeSPI<K,V> getChildDirect(Fqn f)
f
- node fqnvoid addChild(WorkspaceNode<K,V> workspaceNode)
workspaceNode
- boolean isChildrenModified()
boolean isChildrenLoaded()
boolean isResurrected()
void markAsResurrected(boolean resurrected)
resurrected
- boolean isRemoved()
void setRemoved(boolean marker)
void markAsRemoved(boolean marker, boolean recursive)
void clearData()
boolean removeChild(Object nodeName)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.