Module org.elasticsearch.server
Package org.elasticsearch.gateway
Record Class PersistedClusterStateService.OnDiskStateMetadata
java.lang.Object
java.lang.Record
org.elasticsearch.gateway.PersistedClusterStateService.OnDiskStateMetadata
- Enclosing class:
PersistedClusterStateService
-
Constructor Summary
ConstructorsConstructorDescriptionOnDiskStateMetadata(long currentTerm, long lastAcceptedVersion, String nodeId, String clusterUUID, Boolean clusterUUIDCommitted) Creates an instance of aOnDiskStateMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclusterUUIDrecord component.Returns the value of theclusterUUIDCommittedrecord component.longReturns 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.longReturns the value of thelastAcceptedVersionrecord component.nodeId()Returns the value of thenodeIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OnDiskStateMetadata
public OnDiskStateMetadata(long currentTerm, long lastAcceptedVersion, String nodeId, @Nullable String clusterUUID, @Nullable Boolean clusterUUIDCommitted) Creates an instance of aOnDiskStateMetadatarecord class.- Parameters:
currentTerm- the value for thecurrentTermrecord componentlastAcceptedVersion- the value for thelastAcceptedVersionrecord componentnodeId- the value for thenodeIdrecord componentclusterUUID- the value for theclusterUUIDrecord componentclusterUUIDCommitted- the value for theclusterUUIDCommittedrecord component
-
-
Method Details
-
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 '=='. -
currentTerm
public long currentTerm()Returns the value of thecurrentTermrecord component.- Returns:
- the value of the
currentTermrecord component
-
lastAcceptedVersion
public long lastAcceptedVersion()Returns the value of thelastAcceptedVersionrecord component.- Returns:
- the value of the
lastAcceptedVersionrecord component
-
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
clusterUUID
Returns the value of theclusterUUIDrecord component.- Returns:
- the value of the
clusterUUIDrecord component
-
clusterUUIDCommitted
Returns the value of theclusterUUIDCommittedrecord component.- Returns:
- the value of the
clusterUUIDCommittedrecord component
-