Class PeersResponse

    • Constructor Detail

      • PeersResponse

        public PeersResponse​(java.util.Optional<DiscoveryNode> masterNode,
                             java.util.List<DiscoveryNode> knownPeers,
                             long term)
      • PeersResponse

        public PeersResponse​(StreamInput in)
                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getMasterNode

        public java.util.Optional<DiscoveryNode> getMasterNode()
        Returns:
        the node that is currently leading, according to the responding node.
      • getKnownPeers

        public java.util.List<DiscoveryNode> getKnownPeers()
        Returns:
        the collection of known peers of the responding node, or an empty collection if the responding node believes there is currently a leader.
      • getTerm

        public long getTerm()
        Returns:
        the current term of the responding node. If the responding node is the leader then this is the term in which it is currently leading.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object