Package akka.cluster.ddata
Class GCounter$
- java.lang.Object
-
- akka.cluster.ddata.GCounter$
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Serializable
public class GCounter$ extends java.lang.Object implements scala.Serializable
Java API- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GCounter$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.collection.immutable.Map<UniqueAddress,scala.math.BigInt>
$lessinit$greater$default$1()
Implements a 'Growing Counter' CRDT, also called a 'G-Counter'.scala.Option<GCounter>
$lessinit$greater$default$2()
GCounter
apply()
GCounter
create()
Java APIGCounter
empty()
scala.Option<scala.math.BigInt>
unapply(GCounter c)
Extract theGCounter.value()
.
-
-
-
Field Detail
-
MODULE$
public static final GCounter$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
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()
-
empty
public GCounter empty()
-
apply
public GCounter apply()
-
create
public GCounter create()
Java API- Returns:
- (undocumented)
-
unapply
public scala.Option<scala.math.BigInt> unapply(GCounter c)
Extract theGCounter.value()
.- Parameters:
c
- (undocumented)- Returns:
- (undocumented)
-
-