Module org.elasticsearch.server
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
This record provides node state information that can be used to determine why cluster formation has failed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionClusterFormationState(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 aClusterFormationStaterecord class.ClusterFormationState(Settings settings, ClusterState clusterState, List<TransportAddress> resolvedAddresses, List<DiscoveryNode> foundPeers, Set<DiscoveryNode> mastersOfPeers, long currentTerm, ElectionStrategy electionStrategy, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theacceptedTermrecord component.longReturns the value of theclusterStateVersionrecord component.longReturns the value of thecurrentTermrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefoundPeersrecord component.This method provides a human-readable String describing why cluster formation failed.booleanReturns the value of thehasDiscoveredQuorumrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinFlightJoinStatusesrecord component.Returns the value of theinitialMasterNodesSettingrecord component.Returns the value of thelastAcceptedConfigurationrecord component.Returns the value of thelastCommittedConfigurationrecord component.Returns the value of thelocalNoderecord component.Returns the value of themasterEligibleNodesrecord component.Returns the value of themastersOfPeersrecord component.Returns the value of theresolvedAddressesrecord component.Returns the value of thestatusInforecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
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
- 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 aClusterFormationStaterecord class.- Parameters:
initialMasterNodesSetting- the value for theinitialMasterNodesSettingrecord componentlocalNode- the value for thelocalNoderecord componentmasterEligibleNodes- the value for themasterEligibleNodesrecord componentclusterStateVersion- the value for theclusterStateVersionrecord componentacceptedTerm- the value for theacceptedTermrecord componentlastAcceptedConfiguration- the value for thelastAcceptedConfigurationrecord componentlastCommittedConfiguration- the value for thelastCommittedConfigurationrecord componentresolvedAddresses- the value for theresolvedAddressesrecord componentfoundPeers- the value for thefoundPeersrecord componentmastersOfPeers- the value for themastersOfPeersrecord componentcurrentTerm- the value for thecurrentTermrecord componenthasDiscoveredQuorum- the value for thehasDiscoveredQuorumrecord componentstatusInfo- the value for thestatusInforecord componentinFlightJoinStatuses- the value for theinFlightJoinStatusesrecord component
-
-
Method Details
-
getDescription
This method provides a human-readable String describing why cluster formation failed.- Returns:
- A human-readable String describing why cluster formation failed
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
initialMasterNodesSetting
Returns the value of theinitialMasterNodesSettingrecord component.- Returns:
- the value of the
initialMasterNodesSettingrecord component
-
localNode
Returns the value of thelocalNoderecord component.- Returns:
- the value of the
localNoderecord component
-
masterEligibleNodes
Returns the value of themasterEligibleNodesrecord component.- Returns:
- the value of the
masterEligibleNodesrecord component
-
clusterStateVersion
public long clusterStateVersion()Returns the value of theclusterStateVersionrecord component.- Returns:
- the value of the
clusterStateVersionrecord component
-
acceptedTerm
public long acceptedTerm()Returns the value of theacceptedTermrecord component.- Returns:
- the value of the
acceptedTermrecord component
-
lastAcceptedConfiguration
Returns the value of thelastAcceptedConfigurationrecord component.- Returns:
- the value of the
lastAcceptedConfigurationrecord component
-
lastCommittedConfiguration
Returns the value of thelastCommittedConfigurationrecord component.- Returns:
- the value of the
lastCommittedConfigurationrecord component
-
resolvedAddresses
Returns the value of theresolvedAddressesrecord component.- Returns:
- the value of the
resolvedAddressesrecord component
-
foundPeers
Returns the value of thefoundPeersrecord component.- Returns:
- the value of the
foundPeersrecord component
-
mastersOfPeers
Returns the value of themastersOfPeersrecord component.- Returns:
- the value of the
mastersOfPeersrecord component
-
currentTerm
public long currentTerm()Returns the value of thecurrentTermrecord component.- Returns:
- the value of the
currentTermrecord component
-
hasDiscoveredQuorum
public boolean hasDiscoveredQuorum()Returns the value of thehasDiscoveredQuorumrecord component.- Returns:
- the value of the
hasDiscoveredQuorumrecord component
-
statusInfo
Returns the value of thestatusInforecord component.- Returns:
- the value of the
statusInforecord component
-
inFlightJoinStatuses
Returns the value of theinFlightJoinStatusesrecord component.- Returns:
- the value of the
inFlightJoinStatusesrecord component
-