Implements a 'Increment/Decrement Counter' CRDT, also called a 'PN-Counter'.
It is described in the paper A comprehensive study of Convergent and Commutative Replicated Data Types.
PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as two internal GCounters. Merge is handled by merging the internal P and N counters. The value of the counter is the value of the P counter minus the value of the N counter.
This class is immutable, i.e. "modifying" methods return a new instance.
- Companion:
- object
- Source:
- PNCounter.scala
Type members
Value members
Concrete methods
Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
- Source:
- PNCounter.scala
Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
- Source:
- PNCounter.scala
Decrement the counter with the delta n
specified.
If the delta is negative then it will increment instead of decrement.
Decrement the counter with the delta n
specified.
If the delta is negative then it will increment instead of decrement.
- Source:
- PNCounter.scala
Decrement the counter with the delta n
specified.
If the delta is negative then it will increment instead of decrement.
Decrement the counter with the delta n
specified.
If the delta is negative then it will increment instead of decrement.
- Source:
- PNCounter.scala
Decrement the counter with the delta n
specified.
If the delta n
is negative then it will increment instead of decrement.
Decrement the counter with the delta n
specified.
If the delta n
is negative then it will increment instead of decrement.
- Source:
- PNCounter.scala
Scala API: Decrement the counter with the delta n
specified.
If the delta n
is negative then it will increment instead of decrement.
Scala API: Decrement the counter with the delta n
specified.
If the delta n
is negative then it will increment instead of decrement.
- Source:
- PNCounter.scala
Java API: Decrement the counter with the delta n
specified.
If the delta n
is negative then it will increment instead of decrement.
Java API: Decrement the counter with the delta n
specified.
If the delta n
is negative then it will increment instead of decrement.
- Source:
- PNCounter.scala
Java API: Current total value of the counter.
Java API: Current total value of the counter.
- Source:
- PNCounter.scala
Scala API: Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
Scala API: Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
- Source:
- PNCounter.scala
Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
- Source:
- PNCounter.scala
Java API: Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
Java API: Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
- Source:
- PNCounter.scala
Java API: Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
Java API: Increment the counter with the delta n
specified.
If the delta is negative then it will decrement instead of increment.
- Source:
- PNCounter.scala
Scala API: Current total value of the counter.
Scala API: Current total value of the counter.
- Source:
- PNCounter.scala
Deprecated methods
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala
- Deprecated
[Since version 2.5.20]
- Source:
- PNCounter.scala