ChangeStore class

ChangeStore implementation for CRDT

A ChangeStore stores and manages changes to the CRDT state. It provides methods for adding, retrieving, and exporting changes.

Constructors

ChangeStore.empty()
Creates a new empty ChangeStore
factory

Properties

changeCount int
Gets the number of changes in the store
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addChange(Change change) bool
Adds a Change to the store
clear() → void
Clears all Changes from the store
containsChange(OperationId id) bool
Checks if the store contains a change with the given id
exportChanges(Set<OperationId> version, DAG dag) List<Change>
Exports Changes from a specific version
exportChangesNewerThan(VersionVector versionVector) List<Change>
Exports Changes that are newer than the provided versionVector.
getAllChanges() List<Change>
Gets all Changes in the store
getChange(OperationId id) Change?
Gets a change by its id
importChanges(List<Change> changes) int
Imports Changes from another ChangeStore
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune(VersionVector version) int
Removes Changes that are causally older than the provided version vector.
toString() String
Returns a string representation of the ChangeStore
override

Operators

operator ==(Object other) bool
The equality operator.
inherited