Record Class ClusterFormationFailureHelper.ClusterFormationState

java.lang.Object
java.lang.Record
org.elasticsearch.cluster.coordination.ClusterFormationFailureHelper.ClusterFormationState
All Implemented Interfaces:
Writeable
Enclosing class:
ClusterFormationFailureHelper

public static record ClusterFormationFailureHelper.ClusterFormationState(List<String> initialMasterNodesSetting, DiscoveryNode localNode, Map<String,DiscoveryNode> masterEligibleNodes, long clusterStateVersion, long acceptedTerm, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, List<TransportAddress> resolvedAddresses, List<DiscoveryNode> foundPeers, Set<DiscoveryNode> mastersOfPeers, long currentTerm, boolean hasDiscoveredQuorum, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses) extends Record implements Writeable
If this node believes that cluster formation has failed, this record provides information that can be used to determine why that is.
  • Constructor Details

    • ClusterFormationState

      public ClusterFormationState(Settings settings, ClusterState clusterState, List<TransportAddress> resolvedAddresses, List<DiscoveryNode> foundPeers, Set<DiscoveryNode> mastersOfPeers, long currentTerm, ElectionStrategy electionStrategy, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses)
    • ClusterFormationState

      public ClusterFormationState(StreamInput in) throws IOException
      Throws:
      IOException
    • ClusterFormationState

      public ClusterFormationState(List<String> initialMasterNodesSetting, DiscoveryNode localNode, Map<String,DiscoveryNode> masterEligibleNodes, long clusterStateVersion, long acceptedTerm, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, List<TransportAddress> resolvedAddresses, List<DiscoveryNode> foundPeers, Set<DiscoveryNode> mastersOfPeers, long currentTerm, boolean hasDiscoveredQuorum, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses)
      Creates an instance of a ClusterFormationState record class.
      Parameters:
      initialMasterNodesSetting - the value for the initialMasterNodesSetting record component
      localNode - the value for the localNode record component
      masterEligibleNodes - the value for the masterEligibleNodes record component
      clusterStateVersion - the value for the clusterStateVersion record component
      acceptedTerm - the value for the acceptedTerm record component
      lastAcceptedConfiguration - the value for the lastAcceptedConfiguration record component
      lastCommittedConfiguration - the value for the lastCommittedConfiguration record component
      resolvedAddresses - the value for the resolvedAddresses record component
      foundPeers - the value for the foundPeers record component
      mastersOfPeers - the value for the mastersOfPeers record component
      currentTerm - the value for the currentTerm record component
      hasDiscoveredQuorum - the value for the hasDiscoveredQuorum record component
      statusInfo - the value for the statusInfo record component
      inFlightJoinStatuses - the value for the inFlightJoinStatuses record component
  • Method Details

    • getDescription

      public String getDescription()
      This method provides a human-readable String describing why cluster formation failed.
      Returns:
      A human-readable String describing why cluster formation failed
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      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.
    • initialMasterNodesSetting

      public List<String> initialMasterNodesSetting()
      Returns the value of the initialMasterNodesSetting record component.
      Returns:
      the value of the initialMasterNodesSetting record component
    • 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
    • clusterStateVersion

      public long clusterStateVersion()
      Returns the value of the clusterStateVersion record component.
      Returns:
      the value of the clusterStateVersion record component
    • acceptedTerm

      public long acceptedTerm()
      Returns the value of the acceptedTerm record component.
      Returns:
      the value of the acceptedTerm 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
    • resolvedAddresses

      public List<TransportAddress> resolvedAddresses()
      Returns the value of the resolvedAddresses record component.
      Returns:
      the value of the resolvedAddresses record component
    • foundPeers

      public List<DiscoveryNode> foundPeers()
      Returns the value of the foundPeers record component.
      Returns:
      the value of the foundPeers record component
    • mastersOfPeers

      public Set<DiscoveryNode> mastersOfPeers()
      Returns the value of the mastersOfPeers record component.
      Returns:
      the value of the mastersOfPeers record component
    • currentTerm

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

      public boolean hasDiscoveredQuorum()
      Returns the value of the hasDiscoveredQuorum record component.
      Returns:
      the value of the hasDiscoveredQuorum record component
    • statusInfo

      public StatusInfo statusInfo()
      Returns the value of the statusInfo record component.
      Returns:
      the value of the statusInfo record component
    • inFlightJoinStatuses

      public List<JoinStatus> inFlightJoinStatuses()
      Returns the value of the inFlightJoinStatuses record component.
      Returns:
      the value of the inFlightJoinStatuses record component