|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.AbstractNode
public abstract class AbstractNode
Base class for Node.
| Field Summary | |
|---|---|
protected java.util.Map |
children
Map of children names to children. |
protected java.util.Map |
data
Map of general data keys to values. |
protected Fqn |
fqn
Name of the node. |
protected static int |
INDENT
Default output indent for printing. |
| Fields inherited from interface org.jboss.cache.DataNode |
|---|
LOCK_TYPE_NONE, LOCK_TYPE_READ, LOCK_TYPE_WRITE, PRINT_LOCK_DETAILS |
| Constructor Summary | |
|---|---|
AbstractNode()
|
|
| Method Summary | |
|---|---|
void |
addChild(java.lang.Object child_name,
TreeNode n)
Adds the already created child node. |
boolean |
childExists(java.lang.Object child_name)
Returns true if the child exists. |
protected java.util.Map |
children()
Override this if concurrent thread access may occur, in which case return a concurrently modifiable Map. |
abstract java.lang.Object |
clone()
Returns a copy of this node. |
protected java.util.Map |
data()
Returns null or the Map in use with the data. |
TreeNode |
getChild(java.lang.Object child_name)
Returns the named child of this node. |
java.util.Map |
getChildren()
Returns an unmodifiable map, mapping keys to child nodes. |
Fqn |
getFqn()
Returns the name of this node. |
java.lang.Object |
getName()
Returns the name of this node. |
TreeNode |
getParent()
Returns null, children may override this method. |
boolean |
hasChildren()
Returns true if this node has children. |
void |
print(java.lang.StringBuffer sb,
int indent)
Prints the node and children. |
protected void |
printDetailsInMap(java.lang.StringBuffer sb,
int indent,
java.util.Map map)
Adds details of the node into a map as strings. |
void |
printIndent(java.lang.StringBuffer sb,
int indent)
Prints the node with indent. |
void |
put(java.util.Map data)
Adds (merges) the contents of the map with the existing data. |
void |
removeAllChildren()
Removes all children. |
void |
removeChild(java.lang.Object child_name)
Removes the named child of this node. |
void |
setChildren(java.util.Map children)
Not to be exposed. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.cache.DataNode |
|---|
acquire |
| Methods inherited from interface org.jboss.cache.TreeNode |
|---|
acquireAll, clear, containsKey, createChild, createChild, get, getChildrenLoaded, getData, getDataKeys, getImmutableLock, getLock, getOrCreateChild, isLocked, numAttributes, printDetails, printLockInfo, put, put, release, releaseAll, releaseAllForce, releaseForce, remove, setChildrenLoaded, setRecursiveTreeCacheInstance |
| Field Detail |
|---|
protected static final int INDENT
protected Fqn fqn
protected java.util.Map children
protected java.util.Map data
| Constructor Detail |
|---|
public AbstractNode()
| Method Detail |
|---|
public java.lang.Object getName()
getName in interface TreeNodepublic Fqn getFqn()
getFqn in interface TreeNodepublic TreeNode getChild(java.lang.Object child_name)
TreeNode
getChild in interface TreeNodepublic TreeNode getParent()
getParent in interface TreeNodepublic boolean childExists(java.lang.Object child_name)
TreeNode
childExists in interface TreeNodepublic java.util.Map getChildren()
TreeNode
getChildren in interface TreeNodepublic void setChildren(java.util.Map children)
TreeNodepublic boolean hasChildren()
TreeNode
hasChildren in interface TreeNodepublic void put(java.util.Map data)
TreeNode
put in interface TreeNodepublic void removeChild(java.lang.Object child_name)
TreeNode
removeChild in interface TreeNodepublic void removeAllChildren()
TreeNode
removeAllChildren in interface TreeNode
public void print(java.lang.StringBuffer sb,
int indent)
TreeNode
print in interface TreeNode
public void printIndent(java.lang.StringBuffer sb,
int indent)
TreeNode
printIndent in interface TreeNode
public void addChild(java.lang.Object child_name,
TreeNode n)
TreeNode
addChild in interface TreeNodeprotected final java.util.Map data()
protected java.util.Map children()
protected void printDetailsInMap(java.lang.StringBuffer sb,
int indent,
java.util.Map map)
public abstract java.lang.Object clone()
throws java.lang.CloneNotSupportedException
DataNode
clone in interface DataNodeclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||