org.jboss.cache.optimistic
Interface WorkspaceNode
- All Superinterfaces:
- TreeNode
- All Known Implementing Classes:
- WorkspaceNodeImpl
public interface WorkspaceNode
- extends TreeNode
Represents a type of Node
that is to be copied into a TransactionWorkspace
for optimistically locked
nodes. Adds versioning and dirty flags over conventional Nodes.
- Author:
- Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com), Galder Zamarreno
Methods inherited from interface org.jboss.cache.TreeNode |
acquireAll, addChild, childExists, clear, containsKey, createChild, createChild, get, getChild, getChildren, getChildrenLoaded, getData, getDataKeys, getFqn, getImmutableLock, getLock, getName, getOrCreateChild, getParent, hasChildren, isLocked, numAttributes, print, printDetails, printIndent, printLockInfo, put, put, put, release, releaseAll, releaseAllForce, releaseForce, remove, removeAllChildren, removeChild, setChildren, setChildrenLoaded, setRecursiveTreeCacheInstance |
getMergedChildren
java.util.List getMergedChildren()
- Returns:
- Returns 2 Sets - a set of children added (first set) and a set of children removed.
getVersion
DataVersion getVersion()
setVersion
void setVersion(DataVersion version)
getKeys
java.util.Set getKeys()
isDirty
boolean isDirty()
- Returns true if this node needs to be merged when the transaction commits. A node is considered dirty if it
has just been created, deleted or it's data map has changed. If children are added or removed, the node is not
considered dirty - instead, see
isChildrenModified()
.
- Returns:
- true if needs merging, false otherwise.
getMergedData
java.util.Map getMergedData()
getNode
DataNode getNode()
getChildrenNames
java.util.Set getChildrenNames()
isDeleted
boolean isDeleted()
markAsDeleted
void markAsDeleted(boolean marker)
getTransactionWorkspace
TransactionWorkspace getTransactionWorkspace()
isCreated
boolean isCreated()
markAsCreated
void markAsCreated()
createChild
TreeNode createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
TreeCache cache,
DataVersion version)
isVersioningImplicit
boolean isVersioningImplicit()
setVersioningImplicit
void setVersioningImplicit(boolean b)
addChild
void addChild(WorkspaceNode workspaceNode)
isChildrenModified
boolean isChildrenModified()
- Returns:
- true if children have been added to or removed from this node. Not the same as 'dirty'.
Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.