public interface LeaderContender
LeaderElectionService
.Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Returns the address of the
LeaderContender under which other instances can connect
to it. |
void |
grantLeadership(UUID leaderSessionID)
Callback method which is called by the
LeaderElectionService upon selecting this
instance as the new leader. |
void |
handleError(Exception exception)
Callback method which is called by
LeaderElectionService in case of an error in the
service thread. |
void |
revokeLeadership()
Callback method which is called by the
LeaderElectionService upon revoking the
leadership of a former leader. |
void grantLeadership(UUID leaderSessionID)
LeaderElectionService
upon selecting this
instance as the new leader. The method is called with the new leader session ID.leaderSessionID
- New leader session IDvoid revokeLeadership()
LeaderElectionService
upon revoking the
leadership of a former leader. This might happen in case that multiple contenders have
been granted leadership.String getAddress()
LeaderContender
under which other instances can connect
to it.void handleError(Exception exception)
LeaderElectionService
in case of an error in the
service thread.exception
- Caught exceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.