Record Class ClusterFormationFailureHelper.ClusterFormationClusterStateView

java.lang.Object
java.lang.Record
org.elasticsearch.cluster.coordination.ClusterFormationFailureHelper.ClusterFormationClusterStateView
Enclosing class:
ClusterFormationFailureHelper

public static record ClusterFormationFailureHelper.ClusterFormationClusterStateView(DiscoveryNode localNode, Map<String,DiscoveryNode> masterEligibleNodes, long lastAcceptedVersion, long lastAcceptedTerm, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, long currentTerm) extends Record
A helper record containing the subset of the ClusterState that the ClusterFormationFailureHelper.ClusterFormationState requires
  • Constructor Details

    • ClusterFormationClusterStateView

      public ClusterFormationClusterStateView(ClusterState clusterState, long currentTerm)
    • ClusterFormationClusterStateView

      public ClusterFormationClusterStateView(DiscoveryNode localNode, Map<String,DiscoveryNode> masterEligibleNodes, long lastAcceptedVersion, long lastAcceptedTerm, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, long currentTerm)
      Creates an instance of a ClusterFormationClusterStateView record class.
      Parameters:
      localNode - the value for the localNode record component
      masterEligibleNodes - the value for the masterEligibleNodes record component
      lastAcceptedVersion - the value for the lastAcceptedVersion record component
      lastAcceptedTerm - the value for the lastAcceptedTerm record component
      lastAcceptedConfiguration - the value for the lastAcceptedConfiguration record component
      lastCommittedConfiguration - the value for the lastCommittedConfiguration record component
      currentTerm - the value for the currentTerm record component
  • Method Details

    • writeExceptTermTo

      public void writeExceptTermTo(StreamOutput out) throws IOException
      Throws:
      IOException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • localNode

      public DiscoveryNode localNode()
      Returns the value of the localNode record component.
      Returns:
      the value of the localNode record component
    • masterEligibleNodes

      public Map<String,DiscoveryNode> masterEligibleNodes()
      Returns the value of the masterEligibleNodes record component.
      Returns:
      the value of the masterEligibleNodes record component
    • lastAcceptedVersion

      public long lastAcceptedVersion()
      Returns the value of the lastAcceptedVersion record component.
      Returns:
      the value of the lastAcceptedVersion record component
    • lastAcceptedTerm

      public long lastAcceptedTerm()
      Returns the value of the lastAcceptedTerm record component.
      Returns:
      the value of the lastAcceptedTerm record component
    • lastAcceptedConfiguration

      public CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration()
      Returns the value of the lastAcceptedConfiguration record component.
      Returns:
      the value of the lastAcceptedConfiguration record component
    • lastCommittedConfiguration

      public CoordinationMetadata.VotingConfiguration lastCommittedConfiguration()
      Returns the value of the lastCommittedConfiguration record component.
      Returns:
      the value of the lastCommittedConfiguration record component
    • currentTerm

      public long currentTerm()
      Returns the value of the currentTerm record component.
      Returns:
      the value of the currentTerm record component