public class ReadCommittedNode extends NodeInvocationDelegate
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ReadCommittedNode.Flags |
| Modifier and Type | Field and Description |
|---|---|
protected InternalNode |
backup |
protected byte |
flags |
protected InternalNode |
parent |
nodecomponentRegistry, configuration, invocationContextContainer, invoker, originLocal| Constructor and Description |
|---|
ReadCommittedNode(InternalNode node,
InternalNode parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitUpdate(InvocationContext ctx,
DataContainer container)
Commits any updates made on this node to the underlying data structure, making it visible to all other transactions.
|
InternalNode |
getInternalParent() |
boolean |
isChanged()
Only used with MVCC.
|
boolean |
isCreated()
Only used with MVCC.
|
boolean |
isDeleted()
Returns true if the instance has been deleted in the current transaction.
|
protected boolean |
isFlagSet(ReadCommittedNode.Flags flag)
Tests whether a flag is set.
|
boolean |
isNullNode() |
protected InternalNode |
lookupParent(Fqn fqn,
InvocationContext ctx,
DataContainer container)
Performs a lookup for the parent node of the Fqn passed in.
|
void |
markAsDeleted(boolean deleted)
Marks the node as being deleted (or not) in the current transaction.
|
void |
markAsDeleted(boolean deleted,
boolean recursive)
Same as
NodeSPI.markAsDeleted(boolean) except that the option to recurse into children is provided. |
void |
markForUpdate(DataContainer container,
boolean writeSkewCheck)
Marks a node for updating.
|
void |
rollbackUpdate()
Rolls back any changes made to a node.
|
void |
setChildrenLoaded(boolean loaded)
Sets if the children of this node were loaded from a cache loader.
|
void |
setCreated(boolean created)
Sets the created flag on a node.
|
void |
setDataLoaded(boolean loaded)
Sets if the data was loaded from the cache loader.
|
protected void |
setFlag(ReadCommittedNode.Flags flag)
Unility method that sets the value of the given flag to true.
|
protected void |
unsetFlag(ReadCommittedNode.Flags flag)
Utility method that sets the value of the flag to false.
|
protected void |
updateNode(Fqn fqn,
InvocationContext ctx,
DataContainer dataContainer)
Updates state changes on the current node in the underlying data structure.
|
addChild, addChild, addChildDirect, addChildDirect, addChildDirect, addChildDirect, assertValid, clearData, clearDataDirect, containsKeyDirect, dataSize, equals, get, getCache, getChild, getChild, getChildDirect, getChildDirect, getChildren, getChildrenDirect, getChildrenDirect, getChildrenMapDirect, getChildrenNames, getChildrenNamesDirect, getData, getDataDirect, getDelegationTarget, getDirect, getFqn, getInternalState, getKeys, getKeysDirect, getLock, getOrCreateChild, getParent, getParentDirect, getVersion, hasChild, hasChild, hasChildrenDirect, hashCode, injectDependencies, isChildrenLoaded, isDataLoaded, isLeaf, isLockForChildInsertRemove, isResident, isValid, print, printDetails, put, putAll, putAllDirect, putDirect, putIfAbsent, releaseObjectReferences, remove, removeChild, removeChild, removeChildDirect, removeChildDirect, removeChildrenDirect, removeDirect, replace, replace, replaceAll, setChildrenMapDirect, setFqn, setInternalState, setLockForChildInsertRemove, setResident, setValid, setVersion, toStringassertIsConstructed, initializeprotected volatile InternalNode backup
protected byte flags
protected InternalNode parent
public ReadCommittedNode(InternalNode node, InternalNode parent)
public InternalNode getInternalParent()
protected final boolean isFlagSet(ReadCommittedNode.Flags flag)
flag - flag to testprotected final void setFlag(ReadCommittedNode.Flags flag)
flag - flag to setprotected final void unsetFlag(ReadCommittedNode.Flags flag)
flag - flag to unsetpublic boolean isNullNode()
isNullNode in interface NodeSPIisNullNode in class NodeInvocationDelegatepublic void markForUpdate(DataContainer container, boolean writeSkewCheck)
NodeSPImarkForUpdate in interface NodeSPImarkForUpdate in class NodeInvocationDelegatecontainer - data containerwriteSkewCheck - if true, and the node supports write skew checking, nodes are tested for write skews.public void commitUpdate(InvocationContext ctx, DataContainer container)
NodeSPIcommitUpdate in interface NodeSPIcommitUpdate in class NodeInvocationDelegatectx - invocation contextcontainer - data containerprotected final InternalNode lookupParent(Fqn fqn, InvocationContext ctx, DataContainer container) throws NodeNotExistsException
fqn - Fqn whos parent to locatectx - invocation contextcontainer - data containerNodeNotExistsException - if the parent node cannot be found in any scope or data container.protected void updateNode(Fqn fqn, InvocationContext ctx, DataContainer dataContainer)
ctx - invocation contextdataContainer - data containerpublic void rollbackUpdate()
NodeSPIrollbackUpdate in interface NodeSPIrollbackUpdate in class NodeInvocationDelegatepublic boolean isChanged()
NodeSPIisChanged in interface NodeSPIisChanged in class NodeInvocationDelegatepublic boolean isCreated()
NodeSPIisCreated in interface NodeSPIisCreated in class NodeInvocationDelegatepublic void setCreated(boolean created)
NodeSPIsetCreated in interface NodeSPIsetCreated in class NodeInvocationDelegatecreated - flagpublic boolean isDeleted()
NodeSPIisDeleted in interface NodeSPIisDeleted in class NodeInvocationDelegatepublic void markAsDeleted(boolean deleted)
NodeSPImarkAsDeleted in interface NodeSPImarkAsDeleted in class NodeInvocationDelegatedeleted - true if the node has been deleted, false if not.public void markAsDeleted(boolean deleted,
boolean recursive)
NodeSPINodeSPI.markAsDeleted(boolean) except that the option to recurse into children is provided.markAsDeleted in interface NodeSPImarkAsDeleted in class NodeInvocationDelegatedeleted - true if the node has been deleted, false if not.recursive - if true, child nodes (and their children) are marked as well.public void setChildrenLoaded(boolean loaded)
NodeSPIsetChildrenLoaded in interface NodeSPIsetChildrenLoaded in class NodeInvocationDelegateloaded - true if loaded, false otherwisepublic void setDataLoaded(boolean loaded)
NodeSPIsetDataLoaded in interface NodeSPIsetDataLoaded in class NodeInvocationDelegateloaded - true if loaded, false otherwiseCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.