Class ZKSessionWatcher

java.lang.Object
org.apache.pulsar.metadata.impl.ZKSessionWatcher
All Implemented Interfaces:
AutoCloseable, org.apache.zookeeper.Watcher

public class ZKSessionWatcher extends Object implements AutoCloseable, org.apache.zookeeper.Watcher
Monitor the ZK session state every few seconds and send notifications.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    ZKSessionWatcher(org.apache.zookeeper.ZooKeeper zk, Consumer<SessionEvent> sessionListener)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    process(org.apache.zookeeper.WatchedEvent event)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ZKSessionWatcher

      public ZKSessionWatcher(org.apache.zookeeper.ZooKeeper zk, Consumer<SessionEvent> sessionListener)
  • Method Details

    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • process

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