public interface LeaderElectionService
| Modifier and Type | Method and Description |
|---|---|
void |
confirmLeaderSessionID(UUID leaderSessionID)
Confirms that the new leader session ID has been successfully received by the new leader.
|
boolean |
hasLeadership()
Returns true if the
LeaderContender with which the service has been started owns
currently the leadership. |
void |
start(LeaderContender contender)
Starts the leader election service.
|
void |
stop()
Stops the leader election service.
|
void start(LeaderContender contender) throws Exception
contender - LeaderContender which applies for the leadershipExceptionvoid confirmLeaderSessionID(UUID leaderSessionID)
LeaderContender.
The rational behind this method is to establish an order between setting the new leader
session ID in the LeaderContender and publishing the new leader session ID to the
leader retrieval services.leaderSessionID - The new leader session IDboolean hasLeadership()
LeaderContender with which the service has been started owns
currently the leadership.LeaderContender is the leader, otherwise falseCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.