DeltaStore

lofi_acl.collections.DeltaStore
See theDeltaStore companion object
case class DeltaStore[RDT]

Stores a larger state (i.e., the mergeof multiple deltas, called the prefix) along with individual deltas.

Each individual delta group is addressed by a single Dot and is stored alongside the Dots of the delta group. The value addressableDeltas stores the keys (key refers to a single Dot) of the stored delta groups. Note that while each Dot in addressableDeltas is part of the Dots stored along the delta group, the reverse is not true. I.e., not every Dot part of the Dots stored alongside a delta is an address for a delta. The rationale behind this is that we want to keep a merged prefix and prune the deltas that we likely won't retrieve individually. This is useful for a scenario, where we know which deltas are already delivered to every known replica that we might need to send this delta to.

Type parameters

RDT

The type of the deltas.

Value parameters

addressableDeltas

The keys (dots) of stored deltas. (Not necessarily the same as the union of dots of the delta groups, but a subset).

deltas

The delta groups addressed by a Dot.

prefix

The prefix delta.

prefixDots

The dots of the prefix.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addDeltaEvenIfRedundant(dots: Dots, delta: RDT): DeltaStore[RDT]
def addDeltaIfNew(dots: Dots, delta: RDT): DeltaStore[RDT]
def addDeltaOnlyAtDot(dot: Dot, dots: Dots, delta: RDT): DeltaStore[RDT]
def compactAllDeltasIntoPrefix(using lattice: Lattice[RDT]): DeltaStore[RDT]
def compactAllDeltasIntoPrefixSkippingDuplicates(using lattice: Lattice[RDT], bottom: Bottom[RDT]): DeltaStore[RDT]

Creates a new DeltaStore that merges the deltas into the prefix and discards the deltas.

Creates a new DeltaStore that merges the deltas into the prefix and discards the deltas.

This implementation doesn't mergedeltas already part of the prefix (according their dot address) or are duplicate entries in the delta map (according to their dot address).

Attributes

Returns

A DeltaStore with the result of the mergeof the old prefix and all irredundant deltas and no additional deltas.

def contains(dots: Dots): Boolean
def mergeIntoPrefixPruningDeltas(dots: Dots, delta: RDT)(using lattice: Lattice[RDT]): DeltaStore[RDT]
def readAvailableDeltas(dots: Dots): List[(Dots, RDT)]
def readAvailableDeltasAsSingleDelta(dots: Dots)(using lattice: Lattice[RDT]): Option[(Dots, RDT)]
def replaceOrMergeIntoPrefixPruningDeltas(dots: Dots, delta: RDT)(using Lattice[RDT]): DeltaStore[RDT]
def replacePrefixPruningDeltas(dots: Dots, delta: RDT): DeltaStore[RDT]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val retrievableDots: Dots