Class PeersResponse

java.lang.Object
All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted

public class PeersResponse
extends TransportResponse
  • Constructor Details

    • 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 Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Throws:
      java.io.IOException
    • 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