Class LeaderInitiator.CuratorContext
java.lang.Object
org.springframework.integration.zookeeper.leader.LeaderInitiator.CuratorContext
- All Implemented Interfaces:
- Context
- Enclosing class:
- LeaderInitiator
Implementation of leadership context backed by Curator.
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.curator.framework.recipes.leader.ParticipantGet the leaderCollection<org.apache.curator.framework.recipes.leader.Participant>Get the list of participantsgetRole()Get the role for theCandidate.booleanisLeader()Checks if theCandidatethis context was passed to is the leader.toString()voidyield()Causes theCandidatethis context was passed to to relinquish leadership.
- 
Method Details- 
isLeaderpublic boolean isLeader()Description copied from interface:ContextChecks if theCandidatethis context was passed to is the leader.
- 
yieldpublic void yield()Description copied from interface:ContextCauses theCandidatethis context was passed to to relinquish leadership. This method has no effect if the candidate is not currently the leader.
- 
getRoleDescription copied from interface:ContextGet the role for theCandidate.
- 
getLeaderpublic org.apache.curator.framework.recipes.leader.Participant getLeader()Get the leader- Returns:
- the leader.
- Since:
- 6.0.3
 
- 
getParticipantsGet the list of participants- Returns:
- list of participants.
- Since:
- 6.0.3
 
- 
toString
 
-