Class LogicalClock


  • public final class LogicalClock
    extends java.lang.Object
    Logical clock.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogicalClock()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.onosproject.store.LogicalTimestamp getTimestamp()
      Increments and returns the current timestamp.
      void tick​(org.onosproject.store.LogicalTimestamp timestamp)
      Records an event.
      <T> Timestamped<T> timestamp​(T value)
      Returns a timestamped value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LogicalClock

        public LogicalClock()
    • Method Detail

      • tick

        public void tick​(org.onosproject.store.LogicalTimestamp timestamp)
        Records an event.
        Parameters:
        timestamp - the event timestamp
      • timestamp

        public <T> Timestamped<T> timestamp​(T value)
        Returns a timestamped value.
        Type Parameters:
        T - the value type
        Parameters:
        value - the value to timestamp
        Returns:
        the timestamped value
      • getTimestamp

        public org.onosproject.store.LogicalTimestamp getTimestamp()
        Increments and returns the current timestamp.
        Returns:
        the current timestamp