Package org.apache.zookeeper.server
Interface NodeHashMap
- 
- All Known Implementing Classes:
- NodeHashMapImpl
 
 public interface NodeHashMapThe interface defined to manage the hash based on the entries in the nodes map.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clear all the items stored inside this map.Set<Map.Entry<String,DataNode>>entrySet()Return all the entries inside this map.DataNodeget(String path)Return the data node associated with the path.longgetDigest()Return the digest value.voidpostChange(String path, DataNode node)Called after making the changes on the node, which will update the digest.voidpreChange(String path, DataNode node)Called before we made the change on the node, which will clear the digest associated with it.DataNodeput(String path, DataNode node)Add the node into the map and update the digest with the new node.DataNodeputWithoutDigest(String path, DataNode node)Add the node into the map without update the digest.DataNoderemove(String path)Remove the path from the internal nodes map.intsize()Return the size of the nodes stored in this map.
 
- 
- 
- 
Method Detail- 
putDataNode put(String path, DataNode node) Add the node into the map and update the digest with the new node.- Parameters:
- path- the path of the node
- node- the actual node associated with this path
 
 - 
putWithoutDigestDataNode putWithoutDigest(String path, DataNode node) Add the node into the map without update the digest.- Parameters:
- path- the path of the node
- node- the actual node associated with this path
 
 - 
getDataNode get(String path) Return the data node associated with the path.- Parameters:
- path- the path to read from
 
 - 
removeDataNode remove(String path) Remove the path from the internal nodes map.- Parameters:
- path- the path to remove
- Returns:
- the node being removed
 
 - 
clearvoid clear() Clear all the items stored inside this map.
 - 
sizeint size() Return the size of the nodes stored in this map.
 - 
preChangevoid preChange(String path, DataNode node) Called before we made the change on the node, which will clear the digest associated with it.- Parameters:
- path- the path being changed
- node- the node associated with the path
 
 - 
postChangevoid postChange(String path, DataNode node) Called after making the changes on the node, which will update the digest.- Parameters:
- path- the path being changed
- node- the node associated with the path
 
 - 
getDigestlong getDigest() Return the digest value.
 
- 
 
-