public static interface LeaderElectionDriver.Listener
LeaderElectionDriver
.Modifier and Type | Method and Description |
---|---|
void |
onError(Throwable t)
Notifies the listener if an error occurred.
|
void |
onGrantLeadership(UUID leaderSessionID)
Callback that is called once the driver obtains the leadership.
|
void |
onLeaderInformationChange(LeaderInformationRegister leaderInformationRegister)
Notifies the listener about all currently known leader information.
|
void |
onLeaderInformationChange(String componentId,
LeaderInformation leaderInformation)
Notifies the listener about a changed leader information for the given component.
|
void |
onRevokeLeadership()
Callback that is called once the driver loses the leadership.
|
void onGrantLeadership(UUID leaderSessionID)
void onRevokeLeadership()
void onLeaderInformationChange(String componentId, LeaderInformation leaderInformation)
componentId
- identifying the component whose leader information has changedleaderInformation
- new leader informationvoid onLeaderInformationChange(LeaderInformationRegister leaderInformationRegister)
void onError(Throwable t)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.