public interface MultipleComponentLeaderElectionDriver
LeaderInformation for multiple components.| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
MultipleComponentLeaderElectionDriver.Listener
Listener interface for state changes of the
MultipleComponentLeaderElectionDriver. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes the driver.
|
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.
|
boolean hasLeadership()
true if the driver has leadership, otherwise falsevoid publishLeaderInformation(String componentId, LeaderInformation leaderInformation) throws Exception
componentId - identifying the component for which to publish the leader informationleaderInformation - leader information of the respective componentException - if publishing failsCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.