Class LeaderElectionImpl

  • All Implemented Interfaces:
    LeaderElection

    public class LeaderElectionImpl
    extends Object
    implements LeaderElection
    from from org.apache.camel.component.kubernetes.cluster.lock Monitors current status and participate to leader election when no active leaders are present. It communicates changes in leadership and cluster members to the given event handler.
    • Constructor Detail

      • LeaderElectionImpl

        public LeaderElectionImpl​(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient,
                                  KubernetesLockConfiguration lockConfiguration,
                                  org.kie.hacep.core.infra.election.State initialState)
    • Method Detail

      • addCallbacks

        public void addCallbacks​(List<org.kie.hacep.core.infra.election.LeadershipCallback> callbacks)
        Specified by:
        addCallbacks in interface LeaderElection
      • refreshStatus

        public void refreshStatus()
      • lookupNewLeaderInfo

        public boolean lookupNewLeaderInfo()
      • pullClusterMembers

        public Set<String> pullClusterMembers()