public interface MultipleComponentLeaderElectionDriver
LeaderInformation for multiple components.| Modifier and Type | Interface and Description |
|---|---|
static interface |
MultipleComponentLeaderElectionDriver.Listener
Listener interface for state changes of the
MultipleComponentLeaderElectionDriver. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void close()
throws Exception
Exception - if closing this driver failsboolean 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–2023 The Apache Software Foundation. All rights reserved.