Package io.oxia.client.api
Record Class Version
java.lang.Object
java.lang.Record
io.oxia.client.api.Version
- Record Components:
versionId- The current versionId of the record.createdTimestamp- The instant at which the record was created. In epoch milliseconds.modifiedTimestamp- The instant at which the record was last updated. In epoch milliseconds.modificationsCount- The number of modifications since the record was last created.sessionId- The session to which this record is scoped.clientIdentifier- The client to which this record was scoped.
public record Version(long versionId, long createdTimestamp, long modifiedTimestamp, long modificationsCount, Optional<Long> sessionId, Optional<String> clientIdentifier)
extends Record
Oxia record metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientIdentifierrecord component.longReturns the value of thecreatedTimestamprecord 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 themodificationsCountrecord component.longReturns the value of themodifiedTimestamprecord component.Returns the value of thesessionIdrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theversionIdrecord component.
-
Constructor Details
-
Version
public Version(long versionId, long createdTimestamp, long modifiedTimestamp, long modificationsCount, Optional<Long> sessionId, Optional<String> clientIdentifier) Creates an instance of aVersionrecord class.- Parameters:
versionId- the value for theversionIdrecord componentcreatedTimestamp- the value for thecreatedTimestamprecord componentmodifiedTimestamp- the value for themodifiedTimestamprecord componentmodificationsCount- the value for themodificationsCountrecord componentsessionId- the value for thesessionIdrecord componentclientIdentifier- the value for theclientIdentifierrecord 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 '=='. -
versionId
public long versionId()Returns the value of theversionIdrecord component.- Returns:
- the value of the
versionIdrecord component
-
createdTimestamp
public long createdTimestamp()Returns the value of thecreatedTimestamprecord component.- Returns:
- the value of the
createdTimestamprecord component
-
modifiedTimestamp
public long modifiedTimestamp()Returns the value of themodifiedTimestamprecord component.- Returns:
- the value of the
modifiedTimestamprecord component
-
modificationsCount
public long modificationsCount()Returns the value of themodificationsCountrecord component.- Returns:
- the value of the
modificationsCountrecord component
-
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
clientIdentifier
Returns the value of theclientIdentifierrecord component.- Returns:
- the value of the
clientIdentifierrecord component
-