Class ZKRegistrationClient.WatchTask

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Runnable, java.util.function.BiConsumer<Versioned<java.util.Set<BookieId>>,​java.lang.Throwable>, SafeRunnable, org.apache.zookeeper.Watcher
    Enclosing class:
    ZKRegistrationClient

    class ZKRegistrationClient.WatchTask
    extends java.lang.Object
    implements SafeRunnable, org.apache.zookeeper.Watcher, java.util.function.BiConsumer<Versioned<java.util.Set<BookieId>>,​java.lang.Throwable>, java.lang.AutoCloseable
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher

        org.apache.zookeeper.Watcher.Event, org.apache.zookeeper.Watcher.WatcherType
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      WatchTask​(java.lang.String regPath, java.util.concurrent.CompletableFuture<java.lang.Void> firstRunFuture)  
    • Constructor Detail

      • WatchTask

        WatchTask​(java.lang.String regPath,
                  java.util.concurrent.CompletableFuture<java.lang.Void> firstRunFuture)
    • Method Detail

      • getNumListeners

        public int getNumListeners()
      • watch

        void watch()
      • accept

        public void accept​(Versioned<java.util.Set<BookieId>> bookieSet,
                           java.lang.Throwable throwable)
        Specified by:
        accept in interface java.util.function.BiConsumer<Versioned<java.util.Set<BookieId>>,​java.lang.Throwable>
      • process

        public void process​(org.apache.zookeeper.WatchedEvent event)
        Specified by:
        process in interface org.apache.zookeeper.Watcher
      • isClosed

        boolean isClosed()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable