|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.objectmodel.db.NodeHandle
public final class NodeHandle
This class is a handle or reference to a Node. This is to abstract from different methods of reference: Transient Nodes are referred to directly, while persistent nodes are referred to via key/node manager. A handle is used to refer to a node in a safe way over a longer period. While a direct reference may point to a node that has been evicted from the cache and reinstanciated since being set, NodeHandle will always return an up-to-date instance of its node.
Field Summary |
---|
Fields inherited from interface helma.objectmodel.INodeState |
---|
CLEAN, DELETED, INVALID, MODIFIED, NEW, TRANSIENT, VIRTUAL |
Constructor Summary | |
---|---|
NodeHandle(Key key)
Builds a handle given a node's retrieval information. |
|
NodeHandle(Node node)
Builds a handle for a node |
Method Summary | |
---|---|
protected void |
becomePersistent()
This is to notify the handle that the underlying node is becoming persistent and we have to refer to it via the key from now on. |
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getID()
Get the ID for the node described by this handle. |
Key |
getKey()
Get the key for the node described by this handle. |
Node |
getNode(WrappedNodeManager nodemgr)
Get the node described by this node handle |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NodeHandle(Node node)
public NodeHandle(Key key)
Method Detail |
---|
public Node getNode(WrappedNodeManager nodemgr)
public Key getKey()
public java.lang.String getID()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- ...
protected void becomePersistent()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |