Package org.apache.storm.nimbus

## Class LeaderListenerCallback

- java.lang.Object
- - org.apache.storm.nimbus.LeaderListenerCallback

-     public class LeaderListenerCallback
      extends Object

  A callback function when nimbus gains leadership.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LeaderListenerCallback​(Map conf, org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, BlobStore blobStore, ILeaderElector leaderElector, TopoCache tc, IStormClusterState clusterState, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls, StormMetricsRegistry metricsRegistry)` | Creates a `LeaderListenerCallback`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `leaderCallBack​(Object lock)` | Invoke when gains leadership.
    `void` | `notLeaderCallback()` | Invoke when lost leadership.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LeaderListenerCallback

          public LeaderListenerCallback​(Map conf,
                                        org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
                                        BlobStore blobStore,
                                        ILeaderElector leaderElector,
                                        TopoCache tc,
                                        IStormClusterState clusterState,
                                        List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls,
                                        StormMetricsRegistry metricsRegistry)

      Creates a `LeaderListenerCallback`.
      Parameters:
        `conf` - config
        `zk` - zookeeper CuratorFramework client
        `blobStore` - BlobStore
        `leaderElector` - Leader elector
        `tc` - TopoCache
        `clusterState` - IStormClusterState
        `acls` - zookeeper acls

  - ### Method Detail

    - #### leaderCallBack

          public void leaderCallBack​(Object lock)

      Invoke when gains leadership.

    - #### notLeaderCallback

          public void notLeaderCallback()

      Invoke when lost leadership.