public interface LeadershipAdminService
Modifier and Type | Method and Description |
---|---|
boolean |
promoteToTopOfCandidateList(java.lang.String topic,
NodeId nodeId)
Make a node to be the next leader by promoting it to top of candidate list.
|
boolean |
transferLeadership(java.lang.String topic,
NodeId nodeId)
Attempts to assign leadership for a topic to a specified node.
|
void |
unregister(NodeId nodeId)
Removes all active leadership registrations for a given node.
|
boolean transferLeadership(java.lang.String topic, NodeId nodeId)
topic
- leadership topicnodeId
- identifier of the node to be made leaderfalse
if nodeId
is not one of the candidates for for the topic.boolean promoteToTopOfCandidateList(java.lang.String topic, NodeId nodeId)
topic
- leadership topicnodeId
- identifier of node to be next leadertrue
if nodeId is now the top candidate. This method returns false
if nodeId
is not one of the candidates for for the topic.void unregister(NodeId nodeId)
This method will also evict the node from leaderships that it currently owns.
nodeId
- node identifier