public abstract class LeadershipController extends Object
Modifier and Type | Field and Description |
---|---|
protected org.springframework.integration.leader.Candidate |
candidate |
protected static String |
KIND |
protected static String |
KIND_KEY |
protected org.springframework.integration.leader.event.LeaderEventPublisher |
leaderEventPublisher |
protected LeaderProperties |
leaderProperties |
protected PodReadinessWatcher |
leaderReadinessWatcher |
protected Leader |
localLeader |
protected static String |
PROVIDER |
protected static String |
PROVIDER_KEY |
Constructor and Description |
---|
LeadershipController(org.springframework.integration.leader.Candidate candidate,
LeaderProperties leaderProperties,
org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher) |
Modifier and Type | Method and Description |
---|---|
protected abstract PodReadinessWatcher |
createPodReadinessWatcher(String localLeaderId) |
protected Leader |
extractLeader(Map<String,String> data) |
protected Map<String,String> |
getLeaderData(org.springframework.integration.leader.Candidate candidate) |
protected String |
getLeaderKey() |
Optional<Leader> |
getLocalLeader() |
protected void |
handleLeaderChange(Leader newLeader) |
protected void |
notifyOnFailedToAcquire() |
protected void |
notifyOnGranted() |
protected void |
notifyOnRevoked() |
protected void |
restartLeaderReadinessWatcher() |
abstract void |
revoke() |
abstract void |
update() |
protected static final String PROVIDER_KEY
protected static final String PROVIDER
protected static final String KIND_KEY
protected static final String KIND
protected org.springframework.integration.leader.Candidate candidate
protected Leader localLeader
protected LeaderProperties leaderProperties
protected org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher
protected PodReadinessWatcher leaderReadinessWatcher
public LeadershipController(org.springframework.integration.leader.Candidate candidate, LeaderProperties leaderProperties, org.springframework.integration.leader.event.LeaderEventPublisher leaderEventPublisher)
public abstract void update()
public abstract void revoke()
protected String getLeaderKey()
protected Map<String,String> getLeaderData(org.springframework.integration.leader.Candidate candidate)
protected void handleLeaderChange(Leader newLeader)
protected void notifyOnGranted()
protected void notifyOnRevoked()
protected void notifyOnFailedToAcquire()
protected void restartLeaderReadinessWatcher()
protected abstract PodReadinessWatcher createPodReadinessWatcher(String localLeaderId)
Copyright © 2017–2022 Pivotal Software, Inc.. All rights reserved.