pt.unl.fct.di.novasys.babel.crdts.state.utils

Interface VVState

  • All Superinterfaces:
    GenericReplicaState
    All Known Implementing Classes:
    CausalContext, VVContext


    public interface VVState
    extends GenericReplicaState
    Replica state that stores a version version for causal context. The implementations should support the updating of the version vector through timestamps and other version vectors.
    • Method Detail

      • getVVCopy

        VersionVector getVVCopy()
        Gets a copy of the version vector stored in the state.
        Returns:
        the version vector
      • getVV

        VersionVector getVV()
        Gets the version vector stored in the state.
        Returns:
        the version vector
      • incClock

        Timestamp incClock()
        Increments the "clock" of the replica (i.e., increments the specific entry of the replica in question) by generating a new timestamp
        Returns:
        the newly created timestamp
      • updateTs

        void updateTs(Timestamp ts)
        Updates the replica's version vector with a given timestamp. The update only occurs if the timestamp is superior to the entry of the replica.
        Parameters:
        ts - the timestamp to integrate into the version vector.
      • updateVV

        void updateVV(VersionVector vv)
        Updates the replica's version vector with a given version vector. The update only occurs if the any of the entries are superior to replica own entries.
        Parameters:
        vv - the version vector received.
      • mergeTs

        void mergeTs(Timestamp ts)
        Method called when merging the state with other replica. It acts as a wrapper to updateTs when the argument passed is not a null.
        Parameters:
        ts - the timestamp to update.

Copyright © 2024. All rights reserved.