GrowOnlyList

rdts.datatypes.GrowOnlyList
See theGrowOnlyList companion object
case class GrowOnlyList[E](inner: Map[Node[LastWriterWins[E]], Elem[LastWriterWins[E]]])

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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

type Delta = GrowOnlyList[E]

Value members

Concrete methods

def insertAllGL(i: Int, elems: Iterable[E]): Delta
def insertGL(i: Int, e: E): Delta
def read(i: Int): Option[E]
def size: Int
def toLazyList: LazyList[E]
def toList: List[E]
def without(elems: Set[E]): Delta

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product