Class Leadership

  • public class Leadership
    extends Object
    State of leadership for topic.

    Provided by this construct is the current leader and the list of nodeIds currently registered as candidates for election for the topic. Keep in mind that only registered candidates can become leaders.

    • Method Detail

      • topic

        public String topic()
        Returns the leadership topic.
        leadership topic.
      • leaderNodeId

        public NodeId leaderNodeId()
        Returns the nodeId of the leader.
        leader node identifier; will be null if there is no leader
      • leader

        public Leader leader()
        Returns the leader for this topic.
        leader; will be null if there is no leader for topic
      • candidates

        public List<NodeId> candidates()
        Returns an preference-ordered list of nodes that are in the leadership race for this topic.
        a list of NodeIds in priority-order, or an empty list.
      • hashCode

        public int hashCode()
        hashCode in class Object