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 aOnDiskStateMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclusterUUID
record component.Returns the value of theclusterUUIDCommitted
record component.long
Returns the value of thecurrentTerm
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
Returns the value of thelastAcceptedVersion
record component.nodeId()
Returns the value of thenodeId
record component.final String
toString()
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 aOnDiskStateMetadata
record class.- Parameters:
currentTerm
- the value for thecurrentTerm
record componentlastAcceptedVersion
- the value for thelastAcceptedVersion
record componentnodeId
- the value for thenodeId
record componentclusterUUID
- the value for theclusterUUID
record componentclusterUUIDCommitted
- the value for theclusterUUIDCommitted
record 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 thecurrentTerm
record component.- Returns:
- the value of the
currentTerm
record component
-
lastAcceptedVersion
public long lastAcceptedVersion()Returns the value of thelastAcceptedVersion
record component.- Returns:
- the value of the
lastAcceptedVersion
record component
-
nodeId
Returns the value of thenodeId
record component.- Returns:
- the value of the
nodeId
record component
-
clusterUUID
Returns the value of theclusterUUID
record component.- Returns:
- the value of the
clusterUUID
record component
-
clusterUUIDCommitted
Returns the value of theclusterUUIDCommitted
record component.- Returns:
- the value of the
clusterUUIDCommitted
record component
-