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, 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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorDescriptionClusterFormationState
(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, long currentTerm, boolean hasDiscoveredQuorum, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses) Creates an instance of aClusterFormationState
record class.ClusterFormationState
(Settings settings, ClusterState clusterState, List<TransportAddress> resolvedAddresses, List<DiscoveryNode> foundPeers, long currentTerm, ElectionStrategy electionStrategy, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses) -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of theacceptedTerm
record component.long
Returns the value of theclusterStateVersion
record component.long
Returns the value of thecurrentTerm
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefoundPeers
record component.This method provides a human-readable String describing why cluster formation failed.boolean
Returns the value of thehasDiscoveredQuorum
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinFlightJoinStatuses
record component.Returns the value of theinitialMasterNodesSetting
record component.Returns the value of thelastAcceptedConfiguration
record component.Returns the value of thelastCommittedConfiguration
record component.Returns the value of thelocalNode
record component.Returns the value of themasterEligibleNodes
record component.Returns the value of theresolvedAddresses
record component.Returns the value of thestatusInfo
record component.final String
toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
ClusterFormationState
public ClusterFormationState(Settings settings, ClusterState clusterState, List<TransportAddress> resolvedAddresses, List<DiscoveryNode> foundPeers, 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, long currentTerm, boolean hasDiscoveredQuorum, StatusInfo statusInfo, List<JoinStatus> inFlightJoinStatuses) Creates an instance of aClusterFormationState
record class.- Parameters:
initialMasterNodesSetting
- the value for theinitialMasterNodesSetting
record componentlocalNode
- the value for thelocalNode
record componentmasterEligibleNodes
- the value for themasterEligibleNodes
record componentclusterStateVersion
- the value for theclusterStateVersion
record componentacceptedTerm
- the value for theacceptedTerm
record componentlastAcceptedConfiguration
- the value for thelastAcceptedConfiguration
record componentlastCommittedConfiguration
- the value for thelastCommittedConfiguration
record componentresolvedAddresses
- the value for theresolvedAddresses
record componentfoundPeers
- the value for thefoundPeers
record componentcurrentTerm
- the value for thecurrentTerm
record componenthasDiscoveredQuorum
- the value for thehasDiscoveredQuorum
record componentstatusInfo
- the value for thestatusInfo
record componentinFlightJoinStatuses
- the value for theinFlightJoinStatuses
record 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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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 theinitialMasterNodesSetting
record component.- Returns:
- the value of the
initialMasterNodesSetting
record component
-
localNode
Returns the value of thelocalNode
record component.- Returns:
- the value of the
localNode
record component
-
masterEligibleNodes
Returns the value of themasterEligibleNodes
record component.- Returns:
- the value of the
masterEligibleNodes
record component
-
clusterStateVersion
public long clusterStateVersion()Returns the value of theclusterStateVersion
record component.- Returns:
- the value of the
clusterStateVersion
record component
-
acceptedTerm
public long acceptedTerm()Returns the value of theacceptedTerm
record component.- Returns:
- the value of the
acceptedTerm
record component
-
lastAcceptedConfiguration
Returns the value of thelastAcceptedConfiguration
record component.- Returns:
- the value of the
lastAcceptedConfiguration
record component
-
lastCommittedConfiguration
Returns the value of thelastCommittedConfiguration
record component.- Returns:
- the value of the
lastCommittedConfiguration
record component
-
resolvedAddresses
Returns the value of theresolvedAddresses
record component.- Returns:
- the value of the
resolvedAddresses
record component
-
foundPeers
Returns the value of thefoundPeers
record component.- Returns:
- the value of the
foundPeers
record component
-
currentTerm
public long currentTerm()Returns the value of thecurrentTerm
record component.- Returns:
- the value of the
currentTerm
record component
-
hasDiscoveredQuorum
public boolean hasDiscoveredQuorum()Returns the value of thehasDiscoveredQuorum
record component.- Returns:
- the value of the
hasDiscoveredQuorum
record component
-
statusInfo
Returns the value of thestatusInfo
record component.- Returns:
- the value of the
statusInfo
record component
-
inFlightJoinStatuses
Returns the value of theinFlightJoinStatuses
record component.- Returns:
- the value of the
inFlightJoinStatuses
record component
-