Class VectorClock<T extends Identifier>

    • Method Detail

      • getLocalTimestamp

        public LogicalTimestamp getLocalTimestamp()
        Returns the local logical timestamp.
        Returns:
        the logical timestamp for the local identifier
      • getTimestamp

        public LogicalTimestamp getTimestamp​(T identifier)
        Returns the logical timestamp for the given identifier.
        Parameters:
        identifier - the identifier for which to return the timestamp
        Returns:
        the logical timestamp for the given identifier
      • getTimestamps

        public Collection<VectorTimestamp<T>> getTimestamps()
        Returns a collection of identifier-timestamp pairs.
        Returns:
        a collection of identifier-timestamp pairs
      • update

        public void update​(VectorTimestamp<T> timestamp)
        Updates the given timestamp.
        Parameters:
        timestamp - the timestamp to update
      • update

        public void update​(VectorClock<T> clock)
        Updates the vector clock.
        Parameters:
        clock - the vector clock with which to update this clock