Class NodesCache
- java.lang.Object
-
- org.apache.zookeeper.inspector.manager.NodesCache
-
public class NodesCache extends java.lang.Object
A local cache of ZNodes in front of the Zookeeper server(s) to help cut down on network calls. This class will return results from the cache first, if available, and then fetch results remotely from Zookeeper if not.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CACHE_SIZE
static int
ENTRY_EXPIRATION_TIME_MILLIS
-
Constructor Summary
Constructors Constructor Description NodesCache(ZooKeeper zooKeeper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getChildren(java.lang.String nodePath)
Fetch the children of the given node from the cache.
-
-
-
Field Detail
-
CACHE_SIZE
public static final int CACHE_SIZE
- See Also:
- Constant Field Values
-
ENTRY_EXPIRATION_TIME_MILLIS
public static final int ENTRY_EXPIRATION_TIME_MILLIS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodesCache
public NodesCache(ZooKeeper zooKeeper)
-
-
Method Detail
-
getChildren
public java.util.List<java.lang.String> getChildren(java.lang.String nodePath)
Fetch the children of the given node from the cache.- Parameters:
nodePath
- The full path to the parent whose children are to be fetched.- Returns:
- The list of children of the given node as a list of full ZNode path strings or null if an error occurred.
-
-