Package io.atomix.utils.time
Interface Timestamp
- All Superinterfaces:
Comparable<Timestamp>
- All Known Implementing Classes:
LogicalTimestamp,Version,WallClockTimestamp
Opaque version structure.
Classes implementing this interface must also implement hashCode() and equals(Object).
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()default booleanisNewerThan(Timestamp other) Tests if this timestamp is newer than the specified timestamp.default booleanisOlderThan(Timestamp other) Tests if this timestamp is older than the specified timestamp.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
hashCode
int hashCode() -
equals
-
isNewerThan
Tests if this timestamp is newer than the specified timestamp.- Parameters:
other- timestamp to compare against- Returns:
- true if this instance is newer
-
isOlderThan
Tests if this timestamp is older than the specified timestamp.- Parameters:
other- timestamp to compare against- Returns:
- true if this instance is older
-