Class GCounter$

  • All Implemented Interfaces:
    java.io.Serializable, scala.Serializable

    public class GCounter$
    extends java.lang.Object
    implements scala.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • MODULE$

        public static final GCounter$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • GCounter$

        public GCounter$()
    • Method Detail

      • $lessinit$greater$default$1

        public scala.collection.immutable.Map<UniqueAddress,​scala.math.BigInt> $lessinit$greater$default$1()
        Implements a 'Growing Counter' CRDT, also called a 'G-Counter'.

        It is described in the paper A comprehensive study of Convergent and Commutative Replicated Data Types.

        A G-Counter is a increment-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current node. Divergent histories are resolved by taking the maximum count for each node (like a vector clock merge). The value of the counter is the sum of all node counts.

        This class is immutable, i.e. "modifying" methods return a new instance.

        Returns:
        (undocumented)
      • $lessinit$greater$default$2

        public scala.Option<GCounter> $lessinit$greater$default$2()
      • create

        public GCounter create()
        Java API
        Returns:
        (undocumented)
      • unapply

        public scala.Option<scala.math.BigInt> unapply​(GCounter c)
        Extract the GCounter.value().
        Parameters:
        c - (undocumented)
        Returns:
        (undocumented)