public interface LeaderElectionDriver extends AutoCloseable
LeaderInformation
for multiple components.Modifier and Type | Interface and Description |
---|---|
static interface |
LeaderElectionDriver.Listener
Listener interface for state changes of the
LeaderElectionDriver . |
Modifier and Type | Method and Description |
---|---|
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.
|
close
boolean hasLeadership()
true
if the driver has leadership, otherwise false
void 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.