Class LeadershipController

java.lang.Object
org.springframework.cloud.kubernetes.commons.leader.LeadershipController

public abstract class LeadershipController extends Object
Author:
Ryan Baxter
  • Field Details

  • Constructor Details

    • LeadershipController

      public LeadershipController(org.springframework.integration.leader.Candidate candidate, LeaderProperties leaderProperties, org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher)
  • Method Details

    • getLocalLeader

      public Optional<Leader> getLocalLeader()
    • update

      public abstract void update()
    • revoke

      public abstract void revoke()
    • getLeaderKey

      protected String getLeaderKey()
    • getLeaderData

      protected Map<String,String> getLeaderData(org.springframework.integration.leader.Candidate candidate)
    • extractLeader

      protected Leader extractLeader(Map<String,String> data)
    • handleLeaderChange

      protected void handleLeaderChange(Leader newLeader)
    • notifyOnGranted

      protected void notifyOnGranted()
    • notifyOnRevoked

      protected void notifyOnRevoked()
    • notifyOnFailedToAcquire

      protected void notifyOnFailedToAcquire()
    • restartLeaderReadinessWatcher

      protected void restartLeaderReadinessWatcher()
    • createPodReadinessWatcher

      protected abstract PodReadinessWatcher createPodReadinessWatcher(String localLeaderId)