crdt_lf
library
Classes
-
AggregateDefinition<S extends Object, E>
-
Describes a kind of aggregate: its state
S, its events E, and how an
event moves the state.
-
AggregateDelta<S, E>
-
How an aggregate's state moved: from previous to current, through
events.
-
AggregateEvent<E>
-
One event an aggregate applied, with its context.
-
AggregateMigration
-
One step that brings the data of an aggregate from version from to
from + 1.
-
BaseCRDTDocument
-
Defines the foundational contract for a CRDT document.
-
BlobVersionRange
-
The range of snapshot blob layouts a peer reads, or a document holds.
-
Change
-
Change implementation for CRDT.
-
ChangeCodec
-
Versioned binary framing for a list of encoded changes.
-
ChangeStore
-
ChangeStore implementation for CRDT
-
ComposableDelta<D>
-
A delta that can be folded together with the delta that follows it.
-
ContainerHandler
-
Marker interface implemented by handlers that store HandlerRefs pointing
at other handlers, forming a nested tree over the flat document registry.
-
CRDTAggregateHandler<S extends Object, E>
-
CRDT Aggregate
-
CRDTDocument
-
CRDT Document implementation
-
CRDTDocumentEvent
-
One move of the durable state of a CRDTDocument: the changes it holds and
the snapshot they are replayed on top of.
-
CRDTFugueListHandler<T>
-
CRDT List with Fugue implementation
-
CRDTFugueMovableListHandler<T>
-
CRDT List with Fugue implementation and movable elements
-
CRDTFugueRichTextHandler
-
CRDT rich text with Fugue
-
CRDTFugueTextHandler
-
CRDT Text with Fugue implementation
-
CRDTListHandler<T>
-
CRDT List
-
CRDTListRefHandler
-
CRDT ordered list of references
-
CRDTMapHandler<T>
-
CRDT Map
-
CRDTMapRefHandler
-
CRDT Map of references
-
CRDTMovableListRefHandler
-
CRDT movable ordered list of references
-
CRDTORMapHandler<K, V>
-
CRDT OR-Map
-
CRDTORMapRefHandler
-
CRDT OR-Map of references
-
CRDTORSetHandler<T>
-
CRDT OR-Set
-
CRDTORSetRefHandler
-
CRDT OR-Set of references
-
CRDTRegisterHandler<T>
-
CRDT Register (last-writer-wins)
-
CRDTTextHandler
-
CRDT Text
-
CRDTUndoManager
-
Undo and redo for the local edits of a CRDTDocument.
-
DAG
-
DAG (Directed Acyclic Graph) implementation for CRDT
-
DAGNode
-
Directed Acyclic Graph (DAG) Node implementation for CRDT
-
DeltaSink<D>
-
Collects the positional effects of applying operations, one delta of type
D at a time.
-
DeltaSyncPoint<V>
-
A value together with the point of the delta stream it reflects.
-
DiffSegment
-
A single diff segment with an operation and the associated text.
-
DocumentCapabilities
-
What a peer can read, by handler kind.
-
DocumentChangesApplied
-
changes entered the document's change store.
-
DocumentHistoryPruned
-
History was pruned: the changes covered by upTo left the store.
-
DocumentRequirements
-
The formats a document's data is written in, by handler kind.
-
DocumentSnapshotUpdated
-
The document's snapshot is now snapshot.
-
EventContext
-
What AggregateDefinition.reduce knows about the event it applies,
besides the event itself.
-
EventId
-
The identity of one event of a CRDTAggregateHandler: the change it
travels in, its place in that change, and the part a migration made of
it.
-
Frontiers
-
Frontiers implementation for CRDT
-
FugueElementID
-
Represents the ID of an element in the Fugue algorithm
-
FugueElementIDReadResult
-
Result of decoding a FugueElementID from a byte buffer.
-
FugueListState<T>
-
State of the CRDTFugueListHandler: the list of all live node values.
-
FugueMovableListState<T>
-
State of a CRDTFugueMovableListHandler.
-
FugueTextState
-
State of the CRDTFugueTextHandler: the text is the concatenation of all
live node values.
-
Handler<T>
-
Abstract class for CRDT handlers
-
HandlerDelta<D>
-
The observable state of the handler moved by delta.
-
HandlerFormats
-
The format of a handler.
-
HandlerRef
-
A serializable reference to another Handler.
-
HandlerRefCodec
-
ValueCodec for HandlerRef.
-
HandlerReset<D>
-
The observable state is no longer reachable by delta: read it again.
-
HandlerSpec<T extends Handler>
-
Names a kind of handler: the data it holds and the operations that
change it. Not one handler — a kind, which many ids share.
-
HandlerUpdate<D>
-
One event in the delta stream of a handler.
-
HistorySession
-
An interactive controller for navigating the history of a CRDTDocument.
-
InvertibleAggregateDefinition<S extends Object, E>
-
An AggregateDefinition whose events can be undone with
CRDTUndoManager.
-
JsonValueCodec<T>
-
Default JSON-based value codec.
-
MapDelta<K, V>
-
How a map handler's value moved, as one entry per touched key.
-
MapEntryChange<T>
-
What happened to one key of a map.
-
MapEntryRemoved<T>
-
The key is gone.
-
MapEntrySet<T>
-
The key now holds value.
-
Operation
-
Abstract class for operations
-
OperationEnvelope
-
Decoded operation envelope metadata.
-
OperationEnvelopeCodec
-
Binary envelope for operations.
-
OperationId
-
OperationId implementation for CRDT
-
OperationType
-
The kind of change an operation applies, scoped to the handler that owns it.
-
OpIdKey
-
Packed key representation for an OperationId.
-
ORMapEntry<V>
-
Entry in the OR-Map representing a (value, tag) pair
-
ORMapState<K, V>
-
State of the CRDTORMapHandler
-
ORSetState<T>
-
State of the CRDTORSetHandler
-
PeerId
-
PeerId implementation for CRDT
-
RegisterDelta<T>
-
How a register handler's value moved.
-
RichTextDelete
-
Takes count runes out of the text at the current point.
-
RichTextDelta
-
How a rich text moved, as steps applied left to right.
-
RichTextImage
-
An image embed of a CRDTFugueRichTextHandler.
-
RichTextInsert
-
Puts text with attributes into the text at the current point.
-
RichTextInsertEmbed
-
Puts one embed with attributes into the text at the current point.
-
RichTextOp
-
One step of a RichTextDelta.
-
RichTextRetain
-
Keeps count runes and writes attributes over them.
-
RichTextSpan
-
A run of rich text whose runes all carry the same attributes, or one
embed (see embed).
-
RichTextState
-
State of the CRDTFugueRichTextHandler: the text and its marks.
-
RichTextUpdateEmbed
-
Keeps one embed, replaces its data with embed and writes attributes.
-
RichTextVideo
-
A video embed of a CRDTFugueRichTextHandler.
-
RuneOffsets
-
Conversions between UTF-16 code unit and runes.
-
SeqDelete<T>
-
Takes count elements out of the sequence at the current point.
-
SeqInsert<T>
-
Puts values into the sequence at the current point.
-
SeqMove<T>
-
Moves the element at from to to, keeping its identity.
-
SeqOp<T>
-
One step of a SequenceDelta.
-
SeqRetain<T>
-
Keeps count elements as they are and moves past them.
-
SequenceDelta<T>
-
A change to a sequence, as a list of SeqOp steps run left to right.
-
SetDelta<T>
-
How a set handler's value moved.
-
Snapshot
-
Represents a snapshot of a CRDTDocument's state at a specific version.
-
UVarint
-
Unsigned Varint encoding utilities.
-
UVarintResult
-
Result of decoding an unsigned varint.
-
ValueCodec<T>
-
Codec for encoding/decoding generic values into bytes.
-
VersionVector
-
A version vector is a map of PeerIds
to their corresponding
HybridLogicalClock.
-
Wtf8
-
WTF-8 (Wobbly Transformation Format 8-bit) codec.
Functions
-
compareChangeOrder(Change a, Change b)
→ int
-
Orders two Changes first by hlc, then by author.
-
liveRefs(BaseCRDTDocument doc, Iterable<HandlerRef> refs)
→ List<HandlerRef>
-
The subset of
refs whose target is not deleted, in the same order.
-
myersDiff(String oldText, String newText)
→ List<DiffSegment>
-
Compute Myers diff between two strings and return coalesced segments of
Equal, Insert, and Remove operations.
-
nestedValueOf(Handler handler, Set<String> visiting)
→ Object?
-
Resolves
handler to a nested value: recurses through
ContainerHandlers and returns the Handler.value of any other handler
as is.
-
rawIndexOfLive(BaseCRDTDocument doc, List<HandlerRef> refs, int liveIndex)
→ int
-
The position in
refs of the liveIndex-th ref whose target is not
deleted.
-
resolvedChildrenOf(BaseCRDTDocument doc, ContainerHandler handler)
→ Iterable<Handler>
-
Resolves every live reference
handler holds, in the order
ContainerHandler.childRefs gives them.
-
resolveNestedRef(BaseCRDTDocument doc, HandlerRef ref, Set<String> visiting)
→ Object?
-
Resolves
ref to a nested value through doc, with nestedValueOf.
-
seqInsertText(String text)
→ SeqInsert<String>
-
Inserts
text one rune at a time.
-
setEquals<T>(Set<T>? a, Set<T>? b)
→ bool
-
Checks if two sets are equal
-
typedRef<T extends Handler>(Handler? reference)
→ T?
-
Casts an already-resolved
reference to the handler type T, returning
null when it is null or not a T.