Module org.elasticsearch.server
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 Summary
ConstructorsConstructorDescriptionClusterFormationClusterStateView(ClusterState clusterState, long currentTerm) ClusterFormationClusterStateView(DiscoveryNode localNode, Map<String, DiscoveryNode> masterEligibleNodes, long lastAcceptedVersion, long lastAcceptedTerm, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, long currentTerm) Creates an instance of aClusterFormationClusterStateViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecurrentTermrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastAcceptedConfigurationrecord component.longReturns the value of thelastAcceptedTermrecord component.longReturns the value of thelastAcceptedVersionrecord component.Returns the value of thelastCommittedConfigurationrecord component.Returns the value of thelocalNoderecord component.Returns the value of themasterEligibleNodesrecord component.final StringtoString()Returns a string representation of this record class.void
-
Constructor Details
-
ClusterFormationClusterStateView
-
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 aClusterFormationClusterStateViewrecord class.- Parameters:
localNode- the value for thelocalNoderecord componentmasterEligibleNodes- the value for themasterEligibleNodesrecord componentlastAcceptedVersion- the value for thelastAcceptedVersionrecord componentlastAcceptedTerm- the value for thelastAcceptedTermrecord componentlastAcceptedConfiguration- the value for thelastAcceptedConfigurationrecord componentlastCommittedConfiguration- the value for thelastCommittedConfigurationrecord componentcurrentTerm- the value for thecurrentTermrecord component
-
-
Method Details
-
writeExceptTermTo
- 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 '=='. -
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
-
lastAcceptedVersion
public long lastAcceptedVersion()Returns the value of thelastAcceptedVersionrecord component.- Returns:
- the value of the
lastAcceptedVersionrecord component
-
lastAcceptedTerm
public long lastAcceptedTerm()Returns the value of thelastAcceptedTermrecord component.- Returns:
- the value of the
lastAcceptedTermrecord 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
-
currentTerm
public long currentTerm()Returns the value of thecurrentTermrecord component.- Returns:
- the value of the
currentTermrecord component
-