Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.