Class LeadershipController
java.lang.Object
org.springframework.cloud.kubernetes.commons.leader.LeadershipController
- Author:
- Ryan Baxter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.integration.leader.Candidateprotected static final Stringprotected static final Stringprotected org.springframework.integration.leader.event.LeaderEventPublisherprotected LeaderPropertiesprotected PodReadinessWatcherprotected Leaderprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionLeadershipController(org.springframework.integration.leader.Candidate candidate, LeaderProperties leaderProperties, org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PodReadinessWatchercreatePodReadinessWatcher(String localLeaderId) protected LeaderextractLeader(Map<String, String> data) getLeaderData(org.springframework.integration.leader.Candidate candidate) protected Stringprotected voidhandleLeaderChange(Leader newLeader) protected voidprotected voidprotected voidprotected voidabstract voidrevoke()abstract voidupdate()
-
Field Details
-
PROVIDER_KEY
- See Also:
-
PROVIDER
- See Also:
-
KIND_KEY
- See Also:
-
KIND
- See Also:
-
candidate
protected org.springframework.integration.leader.Candidate candidate -
localLeader
-
leaderProperties
-
leaderEventPublisher
protected org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher -
leaderReadinessWatcher
-
-
Constructor Details
-
LeadershipController
public LeadershipController(org.springframework.integration.leader.Candidate candidate, LeaderProperties leaderProperties, org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher)
-
-
Method Details
-
getLocalLeader
-
update
public abstract void update() -
revoke
public abstract void revoke() -
getLeaderKey
-
getLeaderData
-
extractLeader
-
handleLeaderChange
-
notifyOnGranted
protected void notifyOnGranted() -
notifyOnRevoked
protected void notifyOnRevoked() -
notifyOnFailedToAcquire
protected void notifyOnFailedToAcquire() -
restartLeaderReadinessWatcher
protected void restartLeaderReadinessWatcher() -
createPodReadinessWatcher
-