Class VersionVector

    • Constructor Detail

      • VersionVector

        public VersionVector()
    • Method Detail

      • apply

        public static VersionVector apply​(scala.collection.immutable.List<scala.Tuple2<UniqueAddress,​java.lang.Object>> versions)
        INTERNAL API
      • create

        public static VersionVector create()
        Java API
        Returns:
        (undocumented)
      • BeforeInstance

        public static VersionVector.Before$ BeforeInstance()
        Java API: The VersionVector.Before instance
        Returns:
        (undocumented)
      • SameInstance

        public static VersionVector.Same$ SameInstance()
        Java API: The VersionVector.Same instance
        Returns:
        (undocumented)
      • ConcurrentInstance

        public static VersionVector.Concurrent$ ConcurrentInstance()
        Java API: The VersionVector.Concurrent instance
        Returns:
        (undocumented)
      • $colon$plus

        public VersionVector $colon$plus​(SelfUniqueAddress node)
        Increment the version for the node passed as argument. Returns a new VersionVector.
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • $plus

        public VersionVector $plus​(Cluster node)
        Deprecated.
        Use `:+` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
      • $plus

        public VersionVector $plus​(UniqueAddress node)
        INTERNAL API Increment the version for the node passed as argument. Returns a new VersionVector.
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • increment

        public VersionVector increment​(SelfUniqueAddress node)
        Increment the version for the node passed as argument. Returns a new VersionVector.
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • increment

        public VersionVector increment​(Cluster node)
        Deprecated.
        Use `increment` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
      • isEmpty

        public abstract boolean isEmpty()
      • size

        public abstract int size()
        INTERNAL API
        Returns:
        (undocumented)
      • increment

        public abstract VersionVector increment​(UniqueAddress node)
        INTERNAL API Increment the version for the node passed as argument. Returns a new VersionVector.
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • versionAt

        public abstract long versionAt​(UniqueAddress node)
        INTERNAL API
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • contains

        public abstract boolean contains​(UniqueAddress node)
        INTERNAL API
        Parameters:
        node - (undocumented)
        Returns:
        (undocumented)
      • $less$greater

        public boolean $less$greater​(VersionVector that)
        Returns true if this and that are concurrent else false.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • $less

        public boolean $less​(VersionVector that)
        Returns true if this is before that else false.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • $greater

        public boolean $greater​(VersionVector that)
        Returns true if this is after that else false.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • $eq$eq

        public boolean $eq$eq​(VersionVector that)
        Returns true if this VersionVector has the same history as the 'that' VersionVector else false.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • versionsIterator

        public abstract scala.collection.Iterator<scala.Tuple2<UniqueAddress,​java.lang.Object>> versionsIterator()
        INTERNAL API
        Returns:
        (undocumented)
      • compareTo

        public VersionVector.Ordering compareTo​(VersionVector that)
        Compare two version vectors. The outcome will be one of the following:

        
           1. Version 1 is SAME (==)       as Version 2 iff for all i c1(i) == c2(i)
           2. Version 1 is BEFORE (<)      Version 2 iff for all i c1(i) <= c2(i) and there exist a j such that c1(j) < c2(j)
           3. Version 1 is AFTER (>)       Version 2 iff for all i c1(i) >= c2(i) and there exist a j such that c1(j) > c2(j).
           4. Version 1 is CONCURRENT (<>) to Version 2 otherwise.
         
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • merge

        public abstract VersionVector merge​(VersionVector that)
        Merges this VersionVector with another VersionVector. E.g. merges its versioned history.
        Parameters:
        that - (undocumented)
        Returns:
        (undocumented)
      • needPruningFrom

        public abstract boolean needPruningFrom​(UniqueAddress removedNode)
        Description copied from interface: RemovedNodePruning
        Does it have any state changes from a specific node, which has been removed from the cluster.
        Specified by:
        needPruningFrom in interface RemovedNodePruning
        Parameters:
        removedNode - (undocumented)
        Returns:
        (undocumented)
      • prune

        public abstract VersionVector prune​(UniqueAddress removedNode,
                                            UniqueAddress collapseInto)
        Description copied from interface: RemovedNodePruning
        When the removed node has been removed from the cluster the state changes from that node will be pruned by collapsing the data entries to another node.
        Specified by:
        prune in interface RemovedNodePruning
        Parameters:
        removedNode - (undocumented)
        collapseInto - (undocumented)
        Returns:
        (undocumented)