Package org.onosproject.cluster
Interface LeadershipAdminService
- 
 public interface LeadershipAdminServiceInterface for administratively manipulating leadership assignments.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,Leadership>getLeaderBoard()Returns the current leader board.booleanpromoteToTopOfCandidateList(java.lang.String topic, NodeId nodeId)Make a node to be the next leader by promoting it to top of candidate list.booleantransferLeadership(java.lang.String topic, NodeId nodeId)Attempts to assign leadership for a topic to a specified node.voidunregister(NodeId nodeId)Removes all active leadership registrations for a given node.
 
- 
- 
- 
Method Detail- 
transferLeadershipboolean transferLeadership(java.lang.String topic, NodeId nodeId)Attempts to assign leadership for a topic to a specified node.- Parameters:
- topic- leadership topic
- nodeId- identifier of the node to be made leader
- Returns:
- true is the transfer was successfully executed. This method returns falseifnodeIdis not one of the candidates for for the topic.
 
 - 
promoteToTopOfCandidateListboolean promoteToTopOfCandidateList(java.lang.String topic, NodeId nodeId)Make a node to be the next leader by promoting it to top of candidate list.- Parameters:
- topic- leadership topic
- nodeId- identifier of node to be next leader
- Returns:
- trueif nodeId is now the top candidate. This method returns- falseif- nodeIdis not one of the candidates for for the topic.
 
 - 
unregistervoid unregister(NodeId nodeId) Removes all active leadership registrations for a given node.This method will also evict the node from leaderships that it currently owns. - Parameters:
- nodeId- node identifier
 
 - 
getLeaderBoardjava.util.Map<java.lang.String,Leadership> getLeaderBoard() Returns the current leader board.- Returns:
- mapping from topic to leadership info.
 
 
- 
 
-