Class GlobalZooKeeperCache

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.zookeeper.Watcher

    public class GlobalZooKeeperCache
    extends ZooKeeperCache
    implements java.io.Closeable
    Per ZK client ZooKeeper cache supporting ZNode data and children list caches. A cache entry is identified, accessed and invalidated by the ZNode path. For the data cache, ZNode data parsing is done at request time with the given ZooKeeperCache.Deserializer argument.
    • Constructor Detail

      • GlobalZooKeeperCache

        public GlobalZooKeeperCache​(ZooKeeperClientFactory zkClientFactory,
                                    int zkSessionTimeoutMillis,
                                    int zkOperationTimeoutSeconds,
                                    java.lang.String globalZkConnect,
                                    org.apache.bookkeeper.common.util.OrderedExecutor orderedExecutor,
                                    java.util.concurrent.ScheduledExecutorService scheduledExecutor,
                                    int cacheExpirySeconds)
    • Method Detail

      • start

        public void start()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • asyncRestartZooKeeperSession

        protected void asyncRestartZooKeeperSession()