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 Details

    • Version

      public Version(long versionId, long createdTimestamp, long modifiedTimestamp, long modificationsCount, Optional<Long> sessionId, Optional<String> clientIdentifier)
      Creates an instance of a Version record class.
      Parameters:
      versionId - the value for the versionId record component
      createdTimestamp - the value for the createdTimestamp record component
      modifiedTimestamp - the value for the modifiedTimestamp record component
      modificationsCount - the value for the modificationsCount record component
      sessionId - the value for the sessionId record component
      clientIdentifier - the value for the clientIdentifier record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • versionId

      public long versionId()
      Returns the value of the versionId record component.
      Returns:
      the value of the versionId record component
    • createdTimestamp

      public long createdTimestamp()
      Returns the value of the createdTimestamp record component.
      Returns:
      the value of the createdTimestamp record component
    • modifiedTimestamp

      public long modifiedTimestamp()
      Returns the value of the modifiedTimestamp record component.
      Returns:
      the value of the modifiedTimestamp record component
    • modificationsCount

      public long modificationsCount()
      Returns the value of the modificationsCount record component.
      Returns:
      the value of the modificationsCount record component
    • sessionId

      public Optional<Long> sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • clientIdentifier

      public Optional<String> clientIdentifier()
      Returns the value of the clientIdentifier record component.
      Returns:
      the value of the clientIdentifier record component