Class ZKListener

java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKListener
Direct Known Subclasses:
ActiveMasterManager, ClientZKSyncer, DeletionListener, DrainingServerTracker, MasterMaintenanceModeTracker, MetaRegionLocationCache, RegionServerTracker, TableHFileArchiveTracker, ZKLeaderManager, ZKNodeTracker, ZKPermissionWatcher, ZKProcedureUtil, ZKSecretWatcher, ZKSplitLogManagerCoordination, ZkSplitLogWorkerCoordination, ZKVisibilityLabelWatcher

@Private public abstract class ZKListener extends Object
Base class for internal listeners of ZooKeeper events. The ZKWatcher for a process will execute the appropriate methods of implementations of this class. In order to receive events from the watcher, every listener must register itself via ZKWatcher.registerListener(org.apache.hadoop.hbase.zookeeper.ZKListener). Subclasses need only override those methods in which they are interested. Note that the watcher will be blocked when invoking methods in listeners so they must not be long-running.
  • Field Details

  • Constructor Details

  • Method Details

    • nodeCreated

      public void nodeCreated(String path)
      Called when a new node has been created.
      Parameters:
      path - full path of the new node
    • nodeDeleted

      public void nodeDeleted(String path)
      Called when a node has been deleted
      Parameters:
      path - full path of the deleted node
    • nodeDataChanged

      public void nodeDataChanged(String path)
      Called when an existing node has changed data.
      Parameters:
      path - full path of the updated node
    • nodeChildrenChanged

      public void nodeChildrenChanged(String path)
      Called when an existing node has a child node added or removed.
      Parameters:
      path - full path of the node whose children have changed
    • getWatcher

      Returns The watcher associated with this listener