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 and 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)` Constructor for .

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `leaderCallBack()` 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)

      Constructor for .

      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()

      Invoke when gains leadership.

    - #### notLeaderCallback

          public void notLeaderCallback()

      Invoke when lost leadership.

Copyright © 2021 The Apache Software Foundation. All rights reserved.