public abstract class AbstractNode<K,V> extends Object
UnversionedNode
.Modifier and Type | Class and Description |
---|---|
static class |
AbstractNode.NodeFlags
These flags were originally stored as booleans on the UnversionedNode class.
|
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap |
children |
protected short |
flags
Flags placed on the node.
|
protected Fqn |
fqn |
Constructor and Description |
---|
AbstractNode() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(InternalNode<K,V> child) |
void |
addChild(InternalNode<K,V> child,
boolean safe) |
void |
addChild(Object nodeName,
InternalNode<K,V> nodeToAdd) |
NodeSPI<K,V> |
addChildDirect(Fqn f) |
NodeSPI<K,V> |
addChildDirect(Fqn f,
boolean notify) |
void |
addChildDirect(NodeSPI<K,V> child) |
NodeSPI<K,V> |
addChildDirect(Object o,
boolean notify) |
void |
addChildDirect(Object nodeName,
Node<K,V> nodeToAdd) |
boolean |
equals(Object another) |
InternalNode<K,V> |
getChild(Fqn f) |
InternalNode<K,V> |
getChild(Object childName) |
NodeSPI<K,V> |
getChildDirect(Fqn fqn) |
NodeSPI<K,V> |
getChildDirect(Object childName) |
Set<InternalNode<K,V>> |
getChildren() |
Set<InternalNode<K,V>> |
getChildren(boolean includeMarkedForRemoval) |
Set<NodeSPI<K,V>> |
getChildrenDirect() |
Set<NodeSPI<K,V>> |
getChildrenDirect(boolean includeMarkedForRemoval) |
Map<Object,InternalNode<K,V>> |
getChildrenMap() |
Map<Object,Node<K,V>> |
getChildrenMapDirect() |
IdentityLock |
getLock() |
NodeSPI<K,V> |
getOrCreateChild(Object childName,
GlobalTransaction gtx) |
DataVersion |
getVersion() |
int |
hashCode() |
protected boolean |
isFlagSet(AbstractNode.NodeFlags flag)
Tests whether a flag is set.
|
boolean |
isRemoved() |
boolean |
isResident() |
abstract void |
markAsRemoved(boolean marker,
boolean recursive) |
void |
setChildrenMap(ConcurrentMap<Object,InternalNode<K,V>> children) |
void |
setChildrenMapDirect(Map<Object,Node<K,V>> children) |
protected void |
setFlag(AbstractNode.NodeFlags flag)
Unility method that sets the value of the given flag to true.
|
protected void |
setFlag(AbstractNode.NodeFlags flag,
boolean value)
Utility method for setting or unsetting a flag.
|
void |
setRemoved(boolean marker) |
void |
setResident(boolean resident) |
void |
setVersion(DataVersion version) |
protected void |
unsetFlag(AbstractNode.NodeFlags flag)
Utility method that sets the value of the flag to false.
|
protected ConcurrentMap children
protected Fqn fqn
protected short flags
protected final boolean isFlagSet(AbstractNode.NodeFlags flag)
flag
- flag to testprotected final void setFlag(AbstractNode.NodeFlags flag, boolean value)
flags
encoded short. If status is false, the NodeFlag is removed from the encoded short.flag
- flag to set or unsetvalue
- true to set the flag, false to unset the flag.protected final void setFlag(AbstractNode.NodeFlags flag)
flag
- flag to setprotected final void unsetFlag(AbstractNode.NodeFlags flag)
flag
- flag to unsetpublic boolean isRemoved()
public void setResident(boolean resident)
public void setRemoved(boolean marker)
public abstract void markAsRemoved(boolean marker, boolean recursive)
public boolean isResident()
public IdentityLock getLock()
public void setVersion(DataVersion version)
public DataVersion getVersion()
public InternalNode<K,V> getChild(Fqn f)
public InternalNode<K,V> getChild(Object childName)
public Set<InternalNode<K,V>> getChildren()
public Set<InternalNode<K,V>> getChildren(boolean includeMarkedForRemoval)
public Map<Object,InternalNode<K,V>> getChildrenMap()
public void addChild(Object nodeName, InternalNode<K,V> nodeToAdd)
public void addChild(InternalNode<K,V> child)
public void addChild(InternalNode<K,V> child, boolean safe)
public void setChildrenMap(ConcurrentMap<Object,InternalNode<K,V>> children)
public NodeSPI<K,V> getOrCreateChild(Object childName, GlobalTransaction gtx)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.