Interface Clock<TimestampT extends Comparable<TimestampT>>


public interface Clock<TimestampT extends Comparable<TimestampT>>
Clock interface
  • Method Details

    • getTimestamp

      TimestampT getTimestamp()
      Increment and get the current timestamp.
      Returns:
      the incremented timestamp
    • peekTimestamp

      TimestampT peekTimestamp()
      Get the current timestamp without incrementing it.
      Returns:
      the current timestamp
    • updateTimestamp

      TimestampT updateTimestamp(TimestampT receivedTimestamp)
      Update the timestamp with an externally received timestamp. Will set the currently stored timestamp to max(receivedTimestamp, currentTimestamp) + 1
      Parameters:
      receivedTimestamp - the received timestamp
      Returns:
      the previous timestamp