org.jboss.cache
Class OptimisticTreeNode

java.lang.Object
  extended by org.jboss.cache.AbstractNode
      extended by org.jboss.cache.Node
          extended by org.jboss.cache.OptimisticTreeNode
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, DataNode, TreeNode

public class OptimisticTreeNode
extends Node

OptimisticTreeNode contains a data version.

Author:
Manik Surtani (manik@jboss.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.cache.AbstractNode
children, data, fqn, INDENT
 
Fields inherited from interface org.jboss.cache.DataNode
LOCK_TYPE_NONE, LOCK_TYPE_READ, LOCK_TYPE_WRITE, PRINT_LOCK_DETAILS, REMOVAL_MARKER
 
Constructor Summary
OptimisticTreeNode()
           
OptimisticTreeNode(java.lang.Object child_name, Fqn fqn, Node parent, java.util.Map data, boolean mapSafe, TreeCache cache)
           
OptimisticTreeNode(java.lang.Object childName, Fqn fqn, Node parent, java.util.Map data, boolean mapSafe, TreeCache cache, DataVersion version)
           
OptimisticTreeNode(java.lang.Object child_name, Fqn fqn, Node parent, java.util.Map data, TreeCache cache)
           
OptimisticTreeNode(java.lang.Object child_name, Fqn fqn, Node parent, java.lang.Object key, java.lang.Object value, TreeCache cache)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 TreeNode getParent()
          Returns the parent.
 DataVersion getVersion()
          Returns the version id of this node.
 int hashCode()
           
 void setVersion(DataVersion version)
          Sets the version id of this node.
 java.lang.String toString()
          Returns a debug string.
 
Methods inherited from class org.jboss.cache.Node
acquire, acquireAll, acquireReadLock, acquireWriteLock, children, clear, clone, containsKey, createChild, createChild, get, getChildren, getChildren, getChildrenLoaded, getData, getDataKeys, getImmutableLock, getLock, getOrCreateChild, init, isLocked, isMarkedForRemoval, markForRemoval, numAttributes, printDetails, printLockInfo, put, put, readExternal, release, releaseAll, releaseAllForce, releaseForce, remove, setChildrenLoaded, setRecursiveTreeCacheInstance, unmarkForRemoval, writeExternal
 
Methods inherited from class org.jboss.cache.AbstractNode
addChild, childExists, data, getChild, getFqn, getName, hasChildren, print, printDetailsInMap, printIndent, put, removeAllChildren, removeChild, setChildren
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OptimisticTreeNode

public OptimisticTreeNode()

OptimisticTreeNode

public OptimisticTreeNode(java.lang.Object child_name,
                          Fqn fqn,
                          Node parent,
                          java.util.Map data,
                          TreeCache cache)
Parameters:
child_name -
fqn -
parent -
data -
cache -

OptimisticTreeNode

public OptimisticTreeNode(java.lang.Object child_name,
                          Fqn fqn,
                          Node parent,
                          java.util.Map data,
                          boolean mapSafe,
                          TreeCache cache)
Parameters:
child_name -
fqn -
parent -
data -
cache -

OptimisticTreeNode

public OptimisticTreeNode(java.lang.Object child_name,
                          Fqn fqn,
                          Node parent,
                          java.lang.Object key,
                          java.lang.Object value,
                          TreeCache cache)
Parameters:
child_name -
fqn -
parent -
key -
value -
cache -

OptimisticTreeNode

public OptimisticTreeNode(java.lang.Object childName,
                          Fqn fqn,
                          Node parent,
                          java.util.Map data,
                          boolean mapSafe,
                          TreeCache cache,
                          DataVersion version)
Method Detail

getVersion

public DataVersion getVersion()
Returns the version id of this node.

Returns:
the version

getParent

public TreeNode getParent()
Returns the parent.

Specified by:
getParent in interface TreeNode
Overrides:
getParent in class Node

setVersion

public void setVersion(DataVersion version)
Sets the version id of this node.

Parameters:
version -

toString

public java.lang.String toString()
Description copied from class: Node
Returns a debug string.

Overrides:
toString in class Node

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.