Class LeaderInitiator

java.lang.Object
org.springframework.integration.zookeeper.leader.LeaderInitiator
All Implemented Interfaces:
Lifecycle, Phased, SmartLifecycle

public class LeaderInitiator
extends Object
implements SmartLifecycle
Bootstrap leadership candidates with ZooKeeper/Curator. Upon construction, start() must be invoked to register the candidate for leadership election.
Since:
4.2
Author:
Patrick Peralta, Janne Valkealahti, Gary Russell, Artem Bilan
  • Constructor Details

    • LeaderInitiator

      public LeaderInitiator​(org.apache.curator.framework.CuratorFramework client, Candidate candidate)
      Construct a LeaderInitiator.
      Parameters:
      client - Curator client
      candidate - leadership election candidate
    • LeaderInitiator

      public LeaderInitiator​(org.apache.curator.framework.CuratorFramework client, Candidate candidate, String namespace)
      Construct a LeaderInitiator.
      Parameters:
      client - Curator client
      candidate - leadership election candidate
      namespace - namespace base path in zookeeper
  • Method Details