|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.AbstractNode
org.jboss.cache.Node
public class Node
| Field Summary |
|---|
| Fields inherited from class org.jboss.cache.AbstractNode |
|---|
children, data, fqn, INDENT, name, parent |
| Fields inherited from interface org.jboss.cache.DataNode |
|---|
LOCK_TYPE_NONE, LOCK_TYPE_READ, LOCK_TYPE_WRITE, PRINT_LOCK_DETAILS |
| Constructor Summary | |
|---|---|
Node()
|
|
Node(java.lang.Object child_name,
Fqn fqn,
Node parent,
java.util.Map data,
boolean mapSafe,
TreeCache cache)
|
|
Node(java.lang.Object child_name,
Fqn fqn,
Node parent,
java.util.Map data,
TreeCache cache)
|
|
Node(java.lang.Object child_name,
Fqn fqn,
Node parent,
java.lang.Object key,
java.lang.Object value,
TreeCache cache)
|
|
| Method Summary | |
|---|---|
boolean |
acquire(java.lang.Object caller,
long timeout,
int lock_type)
|
java.util.Set |
acquireAll(java.lang.Object caller,
long timeout,
int lock_type)
Not to be exposed. |
protected boolean |
acquireReadLock(java.lang.Object caller,
long timeout)
|
protected boolean |
acquireWriteLock(java.lang.Object caller,
long timeout)
|
protected java.util.Map |
children()
Override this if concurrent thread access may occur. |
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
containsKey(java.lang.Object key)
|
TreeNode |
createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent)
|
TreeNode |
createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
get(java.lang.Object key)
|
boolean |
getChildrenLoaded()
Not to be exposed. |
java.util.Map |
getData()
Returns a copy of the attributes. |
java.util.Set |
getDataKeys()
|
IdentityLock |
getImmutableLock()
Deprecated. Use getLock() instead |
IdentityLock |
getLock()
Not to be exposed. |
TreeNode |
getOrCreateChild(java.lang.Object child_name,
GlobalTransaction gtx,
boolean createIfNotExists)
Creates a new child of this node if it doesn't exist. |
TreeNode |
getParent()
|
protected void |
init()
|
protected void |
init(java.lang.Object child_name,
Fqn fqn,
Node parent,
TreeCache cache)
|
boolean |
isLocked()
Not to be exposed. |
int |
numAttributes()
|
void |
printDetails(java.lang.StringBuffer sb,
int indent)
|
void |
printLockInfo(java.lang.StringBuffer sb,
int indent)
Not to be exposed. |
void |
put(java.util.Map data,
boolean erase)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
release(java.lang.Object caller)
Not to be exposed. |
void |
releaseAll(java.lang.Object owner)
Not to be exposed. |
void |
releaseAllForce()
Not to be exposed. |
void |
releaseForce()
Not to be exposed. |
java.lang.Object |
remove(java.lang.Object key)
|
void |
setChildrenLoaded(boolean flag)
Not to be exposed. |
void |
setRecursiveTreeCacheInstance(TreeCache cache)
Set the tree cache instance recursively down to the children as well. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class org.jboss.cache.AbstractNode |
|---|
addChild, childExists, data, getChild, getChildren, getFqn, getName, hasChildren, print, printDetailsInMap, printIndent, put, removeAllChildren, removeChild, setChildren |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Node()
public Node(java.lang.Object child_name,
Fqn fqn,
Node parent,
java.util.Map data,
TreeCache cache)
child_name - fqn - parent - data - cache -
public Node(java.lang.Object child_name,
Fqn fqn,
Node parent,
java.util.Map data,
boolean mapSafe,
TreeCache cache)
child_name - fqn - parent - data - mapSafe - true if param data can safely be
directly assigned to this object's AbstractNode.data field;
false if param data's contents
should be copied into this object's AbstractNode.data field.cache -
public Node(java.lang.Object child_name,
Fqn fqn,
Node parent,
java.lang.Object key,
java.lang.Object value,
TreeCache cache)
child_name - fqn - parent - key - value - cache - | Method Detail |
|---|
protected final void init(java.lang.Object child_name,
Fqn fqn,
Node parent,
TreeCache cache)
public TreeNode getParent()
getParent in interface TreeNodegetParent in class AbstractNodeprotected void init()
protected java.util.Map children()
AbstractNode
children in class AbstractNodepublic void setRecursiveTreeCacheInstance(TreeCache cache)
setRecursiveTreeCacheInstance in interface DataNodesetRecursiveTreeCacheInstance in interface TreeNodecache - DataNodepublic boolean getChildrenLoaded()
TreeNode
getChildrenLoaded in interface DataNodegetChildrenLoaded in interface TreeNodeDataNodepublic void setChildrenLoaded(boolean flag)
TreeNode
setChildrenLoaded in interface DataNodesetChildrenLoaded in interface TreeNodeDataNodepublic java.lang.Object get(java.lang.Object key)
get in interface TreeNodepublic boolean containsKey(java.lang.Object key)
containsKey in interface TreeNodeDataNodepublic java.util.Set getDataKeys()
getDataKeys in interface TreeNodeDataNodepublic boolean isLocked()
TreeNode
isLocked in interface DataNodeisLocked in interface TreeNodeDataNodepublic IdentityLock getImmutableLock()
TreeNode
getImmutableLock in interface TreeNodeDataNodepublic IdentityLock getLock()
TreeNode
getLock in interface DataNodegetLock in interface TreeNodeDataNodepublic java.util.Map getData()
TreeNode
getData in interface DataNodegetData in interface TreeNodeDataNodepublic int numAttributes()
numAttributes in interface TreeNodeDataNode
public void put(java.util.Map data,
boolean erase)
put in interface TreeNode
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface TreeNode
public TreeNode getOrCreateChild(java.lang.Object child_name,
GlobalTransaction gtx,
boolean createIfNotExists)
DataNode
getOrCreateChild in interface DataNodegetOrCreateChild in interface TreeNodeDataNode
public TreeNode createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent)
createChild in interface TreeNode
public TreeNode createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
java.lang.Object key,
java.lang.Object value)
createChild in interface TreeNodeDataNodepublic java.lang.Object remove(java.lang.Object key)
remove in interface TreeNodepublic void clear()
clear in interface TreeNode
public void printDetails(java.lang.StringBuffer sb,
int indent)
printDetails in interface DataNodeprintDetails in interface TreeNode
public void printLockInfo(java.lang.StringBuffer sb,
int indent)
TreeNode
printLockInfo in interface DataNodeprintLockInfo in interface TreeNodeDataNodepublic java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface DataNodeclone in class AbstractNodejava.lang.CloneNotSupportedException
public boolean acquire(java.lang.Object caller,
long timeout,
int lock_type)
throws LockingException,
TimeoutException,
java.lang.InterruptedException
acquire in interface DataNodeLockingException
TimeoutException
java.lang.InterruptedException
protected boolean acquireReadLock(java.lang.Object caller,
long timeout)
throws LockingException,
TimeoutException,
java.lang.InterruptedException
LockingException
TimeoutException
java.lang.InterruptedException
protected boolean acquireWriteLock(java.lang.Object caller,
long timeout)
throws LockingException,
TimeoutException,
java.lang.InterruptedException
LockingException
TimeoutException
java.lang.InterruptedException
public java.util.Set acquireAll(java.lang.Object caller,
long timeout,
int lock_type)
throws LockingException,
TimeoutException,
java.lang.InterruptedException
TreeNode
acquireAll in interface DataNodeacquireAll in interface TreeNodeLockingException
TimeoutException
java.lang.InterruptedExceptionDataNodepublic void release(java.lang.Object caller)
TreeNode
release in interface TreeNodeDataNodepublic void releaseForce()
TreeNode
releaseForce in interface TreeNodeDataNodepublic void releaseAll(java.lang.Object owner)
TreeNode
releaseAll in interface DataNodereleaseAll in interface TreeNodeDataNodepublic void releaseAllForce()
TreeNode
releaseAllForce in interface DataNodereleaseAllForce in interface TreeNodeDataNode
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||