Cats Api Documentation

Version: 1.2.0

cats.labs.crdt.gcounter

A G-Counter is a grow-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 actor.

Divergent histories are resolved by taking the maximum count for each actor (like a vector clock merge). The value of the counter is the sum of all actor counts.

->GCounter

(->GCounter e node)

Positional factory function for class cats.labs.crdt.gcounter.GCounter.

gcounter

(gcounter)(gcounter node)

A G-Counter data type constructor.

gcounter*

(gcounter* data node)

gcounter?

(gcounter? v)

Return true if v is a instance of GCounter type.