public interface Context
candidates
upon granting and revoking of leadership.Modifier and Type | Method and Description |
---|---|
boolean |
isLeader()
Checks if the
Candidate this context was
passed to is the leader. |
void |
yield()
Causes the
Candidate this context was passed to
to relinquish leadership. |
boolean isLeader()
Candidate
this context was
passed to is the leader.Candidate
this context was
passed to is the leadervoid yield()
Candidate
this context was passed to
to relinquish leadership. This method has no effect
if the candidate is not currently the leader.