@Deprecated public class WorkspaceNodeImpl<K,V> extends AbstractNode<K,V> implements WorkspaceNode<K,V>
Node
and adds versioning and other meta data to it.AbstractNode.NodeFlags
children, flags, fqn
Constructor and Description |
---|
WorkspaceNodeImpl(NodeSPI<K,V> node,
TransactionWorkspace workspace,
NodeFactory<K,V> nodeFactory)
Deprecated.
Constructs with a node and workspace.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(WorkspaceNode<K,V> child)
Deprecated.
Adds a given WorkspaceNode to the current node's child map
|
NodeSPI<K,V> |
addChildDirect(Fqn f)
Deprecated.
|
void |
clearData()
Deprecated.
|
NodeSPI<K,V> |
createChild(Object childName,
NodeSPI<K,V> parent,
CacheSPI<K,V> cache,
DataVersion version)
Deprecated.
Creates a child node.
|
int |
dataSize()
Deprecated.
|
V |
get(K key)
Deprecated.
|
protected CacheSPI<K,V> |
getCache()
Deprecated.
|
NodeSPI<K,V> |
getChildDirect(Fqn f)
Deprecated.
|
Set |
getChildren()
Deprecated.
|
protected Set<Fqn> |
getChildrenAddedSet()
Deprecated.
|
Set<Object> |
getChildrenNames()
Deprecated.
|
protected Set<Fqn> |
getChildrenRemovedSet()
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. |
NodeSPI<K,V> |
getNodeSPI()
Deprecated.
|
Node<K,V> |
getParent()
Deprecated.
|
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 |
hasChild(Fqn f)
Deprecated.
|
boolean |
hasChild(Object o)
Deprecated.
|
protected void |
initFlags()
Deprecated.
|
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 |
isLockForChildInsertRemove()
Deprecated.
|
boolean |
isModified()
Deprecated.
Returns true if this node is modified.
|
boolean |
isResurrected()
Deprecated.
|
boolean |
isValid()
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 |
putIfAbsent(K k,
V v)
Deprecated.
|
void |
releaseObjectReferences(boolean recursive)
Deprecated.
|
V |
remove(K key)
Deprecated.
|
boolean |
removeChild(Fqn f)
Deprecated.
|
boolean |
removeChild(Object childName)
Deprecated.
|
V |
replace(K key,
V value)
Deprecated.
|
boolean |
replace(K key,
V oldValue,
V newValue)
Deprecated.
|
void |
replaceAll(Map<K,V> data)
Deprecated.
|
void |
setLockForChildInsertRemove(boolean lockForChildInsertRemove)
Deprecated.
|
void |
setVersion(DataVersion version)
Deprecated.
Sets the data version of this workspace node.
|
void |
setVersioningImplicit(boolean versioningImplicit)
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) ) |
String |
toString()
Deprecated.
|
addChild, addChild, addChild, addChildDirect, addChildDirect, addChildDirect, addChildDirect, equals, getChild, getChild, getChildDirect, getChildren, getChildrenDirect, getChildrenDirect, getChildrenMap, getChildrenMapDirect, getLock, getOrCreateChild, hashCode, isFlagSet, isRemoved, isResident, setChildrenMap, setChildrenMapDirect, setFlag, setFlag, setRemoved, setResident, unsetFlag
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildDirect, isRemoved, setRemoved
public WorkspaceNodeImpl(NodeSPI<K,V> node, TransactionWorkspace workspace, NodeFactory<K,V> nodeFactory)
protected void initFlags()
public boolean isChildrenModified()
isChildrenModified
in interface WorkspaceNode<K,V>
public boolean isChildrenLoaded()
isChildrenLoaded
in interface WorkspaceNode<K,V>
public boolean isResurrected()
isResurrected
in interface WorkspaceNode<K,V>
public void markAsResurrected(boolean resurrected)
WorkspaceNode
markAsResurrected
in interface WorkspaceNode<K,V>
public void markAsRemoved(boolean marker, boolean recursive)
markAsRemoved
in interface WorkspaceNode<K,V>
markAsRemoved
in class AbstractNode<K,V>
public boolean isModified()
isModified
in interface WorkspaceNode<K,V>
public boolean isDirty()
isDirty
in interface WorkspaceNode<K,V>
public Fqn getFqn()
getFqn
in interface WorkspaceNode<K,V>
public void putAll(Map<K,V> data)
putAll
in interface WorkspaceNode<K,V>
public Set<Object> getChildrenNames()
getChildrenNames
in interface WorkspaceNode<K,V>
public NodeSPI<K,V> createChild(Object childName, NodeSPI<K,V> parent, CacheSPI<K,V> cache, DataVersion version)
WorkspaceNode
createChild
in interface WorkspaceNode<K,V>
childName
- 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.public boolean isVersioningImplicit()
WorkspaceNode
DefaultDataVersion
rather than a custom DataVersion
passed in using Option.setDataVersion(DataVersion)
)isVersioningImplicit
in interface WorkspaceNode<K,V>
public void setVersioningImplicit(boolean versioningImplicit)
WorkspaceNode
DefaultDataVersion
rather than a custom DataVersion
passed in using Option.setDataVersion(DataVersion)
)setVersioningImplicit
in interface WorkspaceNode<K,V>
versioningImplicit
- set to true if versioning is implicit, false otherwise.public NodeSPI<K,V> getNode()
WorkspaceNode
NodeSPI
instance.getNode
in interface WorkspaceNode<K,V>
public DataVersion getVersion()
WorkspaceNode
getVersion
in interface WorkspaceNode<K,V>
getVersion
in class AbstractNode<K,V>
public void setVersion(DataVersion version)
WorkspaceNode
setVersion
in interface WorkspaceNode<K,V>
setVersion
in class AbstractNode<K,V>
version
- a DataVersion
implementation.public List<Set<Fqn>> getMergedChildren()
WorkspaceNode
getMergedChildren
in interface WorkspaceNode<K,V>
public Map<K,V> getMergedData()
WorkspaceNode
getMergedData
in interface WorkspaceNode<K,V>
public TransactionWorkspace getTransactionWorkspace()
WorkspaceNode
getTransactionWorkspace
in interface WorkspaceNode<K,V>
public boolean isCreated()
isCreated
in interface WorkspaceNode<K,V>
public void markAsCreated()
WorkspaceNode
markAsCreated
in interface WorkspaceNode<K,V>
public NodeSPI<K,V> addChildDirect(Fqn f)
addChildDirect
in class AbstractNode<K,V>
public void addChild(WorkspaceNode<K,V> child)
WorkspaceNode
addChild
in interface WorkspaceNode<K,V>
public void clearData()
clearData
in interface WorkspaceNode<K,V>
public int dataSize()
public boolean hasChild(Object o)
public boolean isValid()
public boolean isLockForChildInsertRemove()
public void setLockForChildInsertRemove(boolean lockForChildInsertRemove)
public void releaseObjectReferences(boolean recursive)
public NodeSPI<K,V> getChildDirect(Fqn f)
WorkspaceNode
getChildDirect
in interface WorkspaceNode<K,V>
getChildDirect
in class AbstractNode<K,V>
f
- node fqnpublic Set getChildren()
getChildren
in class AbstractNode<K,V>
public boolean hasChild(Fqn f)
public boolean removeChild(Fqn f)
public boolean removeChild(Object childName)
removeChild
in interface WorkspaceNode<K,V>
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.