Class PeersResponse

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted

public class PeersResponse extends TransportResponse
  • Constructor Details

  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Throws:
      IOException
    • getMasterNode

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

      public 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 String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object