|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.caching.spatialindex.NodeIdentifier
public abstract class NodeIdentifier
Instances of this class provide unique identifiers for nodes, and are used to store and retrieve nodes from their storage. Implementors must take care that instances have to be immutable. Nodes are basically identified by the region they represent. Kinds of nodes or kinds of storage may require to use other elements to identify nodes. Implementors must take care to override hashCode() and equals() accordingly. NodeIdentifier should not reference the node they identify, as they are likely to be used to passivate nodes in secondary storage.
Method Summary | |
---|---|
Node |
getNode()
May return null; node is held onto with a soft reference |
abstract Shape |
getShape()
|
boolean |
isLocked()
|
boolean |
isValid()
|
boolean |
isWritable()
Only want to write to nodes that aren't being read. |
void |
readLock()
Acquire a read lock on the node |
void |
readUnLock()
Unlock read lock |
void |
setNode(Node n)
Sets the node associated with the nodeid; this node is stored as a soft reference so getNode() may return null. |
void |
setValid(boolean valid)
Sets the validity of the node; true means the data in the node is ready for reading. |
void |
writeLock()
Acquire a write lock on the node |
void |
writeUnLock()
Unlock the write lock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract Shape getShape()
public boolean isValid()
public void setValid(boolean valid)
valid
- public void writeLock() throws java.lang.Exception
java.lang.Exception
public void writeUnLock()
public void readLock() throws java.lang.Exception
java.lang.Exception
public void readUnLock()
public boolean isWritable()
public boolean isLocked()
public void setNode(Node n)
n
- public Node getNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |