Package io.atomix.utils.time
Class Version
java.lang.Object
io.atomix.utils.time.Version
- All Implemented Interfaces:
Timestamp,Comparable<Timestamp>
Logical timestamp for versions.
The version is a logical timestamp that represents a point in logical time at which an event occurs. This is used in both pessimistic and optimistic locking protocols to ensure that the state of a shared resource has not changed at the end of a transaction.
-
Constructor Details
-
Version
public Version(long version)
-
-
Method Details
-
value
public long value()Returns the version.- Returns:
- the version
-
compareTo
- Specified by:
compareToin interfaceComparable<Timestamp>
-
hashCode
public int hashCode() -
equals
-
toString
-