Class AbstractCandidate
java.lang.Object
org.springframework.integration.leader.AbstractCandidate
- All Implemented Interfaces:
- Candidate
- Direct Known Subclasses:
- DefaultCandidate
- 
Constructor SummaryConstructorsConstructorDescriptionInstantiate a abstract candidate.AbstractCandidate(String id, String role) Instantiate a abstract candidate.
- 
Method Summary
- 
Constructor Details- 
AbstractCandidatepublic AbstractCandidate()Instantiate a abstract candidate.
- 
AbstractCandidate
 
- 
- 
Method Details- 
getRoleDescription copied from interface:CandidateGets the role.
- 
getId
- 
onGrantedDescription copied from interface:CandidateCallback method invoked when this candidate is elected leader. Implementations may chose to launch a background thread to perform leadership roles and return immediately. Another option is for implementations to perform all leadership work in the thread invoking this method. In the latter case, the method must respond to thread interrupts by throwingInterruptedException. When the thread is interrupted, this indicates that this candidate is no longer leader.- Specified by:
- onGrantedin interface- Candidate
- Parameters:
- ctx- leadership context
- Throws:
- InterruptedException- when this candidate is no longer leader
 
- 
onRevokedDescription copied from interface:CandidateCallback method invoked when this candidate is no longer leader. Implementations should use this to shut down any resources (threads, network connections, etc) used to perform leadership work.
 
-