Module itc

Data Types

clock()

abstract datatype: clock()

event()

event() = non_neg_integer() | {Base::non_neg_integer(), Left::event(), Right::event()}

id()

id() = non_neg_integer() | {Left::id(), Right::id()}

Function Index

decode/1
encode/1
event/1Adds a new event to the event component, i.e.
explode/1Splits the Id from the Event part of the clock.
fork/1Split an Id into two related ones.
join/2Merge two forked trees.
len/1
leq/2Compares events from two trees to figure out if the first one is smaller than or equal to the second one.
peek/1Special case of a fork that creates an anonymous tree with events to transmit causal information without registering new events, meaning it should be used for replication.
rebuild/2Takes an id and an event counter and combines them into a clock.
seed/0Initial seed.
str/1

Function Details

decode/1

decode(B) -> any()

encode/1

encode(X1) -> any()

event/1

event(X1::clock()) -> clock()

Adds a new event to the event component, i.e. marking that an item has been written to or updated.

explode/1

explode(X1::clock()) -> {id(), event()}

Splits the Id from the Event part of the clock.

fork/1

fork(X1::clock()) -> {clock(), clock()}

Split an Id into two related ones. This is used when you want to add a new replica to the entire set.

join/2

join(X1::clock(), X2::clock()) -> clock()

Merge two forked trees.

len/1

len(D) -> any()

leq/2

leq(X1::clock(), X2::clock()) -> boolean()

Compares events from two trees to figure out if the first one is smaller than or equal to the second one.

peek/1

peek(X1::clock()) -> ReadOnly::clock()

Special case of a fork that creates an anonymous tree with events to transmit causal information without registering new events, meaning it should be used for replication.

Because the peek fork returns an anonymous tree and the original tree itself, the function only returns the modified one.

rebuild/2

rebuild(Id::id(), Event::undefined | event()) -> clock()

Takes an id and an event counter and combines them into a clock.

seed/0

seed() -> clock()

Initial seed.

str/1

str(X1) -> any()


Generated by EDoc