public interface LeaderElectionDriver extends AutoCloseable
LeaderInformation for multiple components.| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
LeaderElectionDriver.Listener
Listener interface for state changes of the
LeaderElectionDriver. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deleteLeaderInformation(String componentId)
Deletes the leader information for the given component.
|
boolean |
hasLeadership()
Returns whether the driver has currently leadership.
|
void |
publishLeaderInformation(String componentId,
LeaderInformation leaderInformation)
Publishes the leader information for the given component.
|
closeboolean hasLeadership()
true if the driver has leadership, otherwise falsevoid publishLeaderInformation(String componentId, LeaderInformation leaderInformation)
componentId - identifying the component for which to publish the leader informationleaderInformation - leader information of the respective componentvoid deleteLeaderInformation(String componentId)
componentId - identifying the component for which to delete the leader informationCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.