kofre.datatypes
Members list
Type members
Classlikes
An AddWinsSet (Add-Wins Set) is a Delta CRDT modeling a set.
An AddWinsSet (Add-Wins Set) is a Delta CRDT modeling a set.
When an element is concurrently added and removed/cleared from the set then the add operation wins, i.e. the resulting set contains the element.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- AddWinsSet.type
An LWW (Last Writer Wins) is a Delta CRDT modeling a register.
An LWW (Last Writer Wins) is a Delta CRDT modeling a register.
If two concurrent write operations occur, the resulting LWW takes on the value of the write operation with the later timestamp.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- CausalLastWriterWins.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- CausalQueue.type
An EWFlag (Enable-Wins Flag) is a Delta CRDT modeling a boolean flag.
An EWFlag (Enable-Wins Flag) is a Delta CRDT modeling a boolean flag.
When the flag is concurrently disabled and enabled then the enable operation wins, i.e. the resulting flag is enabled.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- EnableWinsFlag.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
A GCounter is a Delta CRDT modeling an increment-only counter.
A GCounter is a Delta CRDT modeling an increment-only counter.
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- GrowOnlyCounter.type
A GrowOnlyList is a Delta CRDT modeling a grow-only list where list elements can neither be removed nor modified.
A GrowOnlyList is a Delta CRDT modeling a grow-only list where list elements can neither be removed nor modified.
Concurrent inserts at the same index i are resolved by the timestamps of the insert operations: the later insert will be at index i while the earlier insert will be pushed to index i+1.
Note: GrowOnlyList is implemented as a linked list, thus the time needed to execute operations at the end of the list will scale linearly with the length of the list. Similarly, toList always has to iterate the whole list, so for applications that don't always need the whole list you should consider using toLazyList instead.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- GrowOnlyList.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- GrowOnlyMap.type
A GrowOnlySet is a Delta CRDT modeling a simple grow-only set.
A GrowOnlySet is a Delta CRDT modeling a simple grow-only set.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- GrowOnlySet.type
Lattice with the least-upper-bound defined by the timeStamp. Timestamps must be unique, totally ordered, consistent with causal order.
Lattice with the least-upper-bound defined by the timeStamp. Timestamps must be unique, totally ordered, consistent with causal order.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- LastWriterWins.type
An MultiVersionRegister (Multi-Value Register) is a Delta CRDT modeling a register.
An MultiVersionRegister (Multi-Value Register) is a Delta CRDT modeling a register.
In the absence of concurrent writes, the MultiVersionRegister is either empty or holds one value. When multiple values are written concurrently, reading the MultiVersionRegister returns a set holding all these values.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- MultiVersionRegister.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
An ObserveRemoveMap (Observed-Remove Map) is a Delta CRDT that models a map from an arbitrary key type to nested causal Delta CRDTs. In contrast to GrowOnlyMap, ObserveRemoveMap allows the removal of key/value pairs from the map.
An ObserveRemoveMap (Observed-Remove Map) is a Delta CRDT that models a map from an arbitrary key type to nested causal Delta CRDTs. In contrast to GrowOnlyMap, ObserveRemoveMap allows the removal of key/value pairs from the map.
The nested CRDTs can be queried/mutated by calling the queryKey/mutateKey methods with a DeltaQuery/DeltaMutator generated
by a CRDT Interface method of the nested CRDT. For example, to enable a nested EWFlag, one would pass EWFlagInterface.enable()
as the DeltaMutator to mutateKey.
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- ObserveRemoveMap.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
A PNCounter (Positive-Negative Counter) is a Delta CRDT modeling a counter.
A PNCounter (Positive-Negative Counter) is a Delta CRDT modeling a counter.
It is composed of two grow-only counters (see GrowOnlyCounter) to enable both increments and decrements of the counter value.
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- PosNegCounter.type
An RGA (Replicated Growable Array) is a Delta CRDT modeling a list.
An RGA (Replicated Growable Array) is a Delta CRDT modeling a list.
When two values are concurrently inserted at an index i, the value of the insert operation with the later timestamp will be at index i while the earlier inserted value will be pushed to index i+1. When an element is subject to two concurrent updates, the later update overwrites the earlier update. If an element is concurrently updated and deleted, the element will simply be deleted, ignoring the update.
Note that RGAs are implemented as linked lists, thus the time needed to execute operations toward the end of the list will scale linearly with the size of the list.
To correctly handle concurrent remote inserts next to elements that were deleted locally, the RGA implementation internally keeps deleted elements as hidden tombstones in the list. Since many tombstones will slow down the operations on this data structure, purgeTombstones should be executed periodically to remove tombstones from the list. Note however that this invalidates any concurrent insert operations. Ideally, purgeTombstones should only be called in downtime periods and only by privileged replicas.
This implementation was modeled after the RGA proposed by Roh et al. in "Replicated abstract data types: Building blocks for collaborative applications", see here
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- ReplicatedList.type
A TwoPhaseSet (Two-Phase Set) is a Delta CRDT modeling a set.
A TwoPhaseSet (Two-Phase Set) is a Delta CRDT modeling a set.
The set is modeled as two grow-only sets, a set of added elements and a set of removed elements. Because of this, elements that were removed from the set once can never be re-added.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- TwoPhaseSet.type
Types
A GMap (Grow-only Map) is a Delta CRDT that models a map from an arbitrary key type to nested Delta CRDTs. In contrast to ObserveRemoveMap, key/value pairs cannot be removed from this map. However, due to the smaller internal representation, mutate operations on large maps are a lot faster than on ObserveRemoveMap.
A GMap (Grow-only Map) is a Delta CRDT that models a map from an arbitrary key type to nested Delta CRDTs. In contrast to ObserveRemoveMap, key/value pairs cannot be removed from this map. However, due to the smaller internal representation, mutate operations on large maps are a lot faster than on ObserveRemoveMap.
The nested CRDTs can be queried/mutated by calling the queryKey/mutateKey methods with a DeltaQuery/DeltaMutator generated
by a CRDT Interface method of the nested CRDT. For example, to enable a nested EWFlag, one would pass EWFlagInterface.enable()
as the DeltaMutator to mutateKey.