Mentions légales du service

Skip to content

Make timestamps more generic objects

Timestamps should be more generic.

  • Make an OperationUID interface, providing getClientUId(), compareTo() and (de)serialization methods.
  • Make Timestamp implement OperationUID
  • Use OperationUID & remove direct access to properties in VersionVector
  • Use OperationUID & remove direct access to properties in PNCounter

To be discussed: the Timestamp.CNT_MIN_VALUE specific value is used in VersionVector as a default value for inexistent entries (in get() and max()). This must be replaced by either:

  • null, which we tried to avoid as it adds complexity to comparisons
  • an implementation-specific CNT_MIN_VALUE, to be provided by classes implementing OperationUID, that VersionVector constructor receives (directly or via a reference to an OperationUID object used as factory).
    Note that making VersionVector a generic type would not be enough, due to type erasure.

This could also lead to serialization issues.

Edited by Florent Coriat
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information