java.lang.Object
org.opensearch.cluster.coordination.Join
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable

public class Join extends Object implements org.opensearch.core.common.io.stream.Writeable
Triggered by a StartJoinRequest, instances of this class represent join votes, and have a source and target node. The source node is the node that provides the vote, and the target node is the node for which this vote is cast. A node will only cast a single vote per term, and this for a unique target node. The vote also carries information about the current state of the node that provided the vote, so that the receiver of the vote can determine if it has a more up-to-date state than the source node.
Opensearch.internal:
  • Constructor Details

    • Join

      public Join(DiscoveryNode sourceNode, DiscoveryNode targetNode, long term, long lastAcceptedTerm, long lastAcceptedVersion)
    • Join

      public Join(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException
    • getSourceNode

      public DiscoveryNode getSourceNode()
    • getTargetNode

      public DiscoveryNode getTargetNode()
    • targetMatches

      public boolean targetMatches(DiscoveryNode matchingNode)
    • getLastAcceptedVersion

      public long getLastAcceptedVersion()
    • getTerm

      public long getTerm()
    • getLastAcceptedTerm

      public long getLastAcceptedTerm()
    • 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