public class Version extends java.lang.Object implements Timestamp
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 and Description |
---|
Version(long version) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Timestamp o) |
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
toString() |
long |
value()
Returns the lock version.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isNewerThan, isOlderThan
public int compareTo(Timestamp o)
compareTo
in interface java.lang.Comparable<Timestamp>
public int hashCode()
public boolean equals(java.lang.Object obj)
public java.lang.String toString()
toString
in class java.lang.Object
public long value()