Module riak_dt_orset

Behaviours: riak_dt.

Data Types

actor()

actor() = riak_dt:actor()

binary_orset()

binary_orset() = binary()

A binary that from_binary/1 will operate on.

member()

member() = term()

orset()

abstract datatype: orset()

orset_op()

orset_op() = {add, member()} | {remove, member()} | {add_all, [member()]} | {remove_all, [member()]} | {update, [orset_op()]}

Function Index

equal/2
from_binary/1
merge/2
new/0
parent_clock/2
precondition_context/1the precondition context is a fragment of the CRDT that operations with pre-conditions can be applied too.
stat/2
stats/1
to_binary/1
to_binary/2
to_version/2
update/3
update/4
value/1
value/2

Function Details

equal/2

equal(ORDictA::orset(), ORDictB::orset()) -> boolean()

from_binary/1

from_binary(B::binary_orset()) -> {ok, orset()} | {error, unsupported_version, Vers::pos_integer()} | {error, invalid_binary}

merge/2

merge(ORDictA::orset(), ORDictB::orset()) -> orset()

new/0

new() -> orset()

parent_clock/2

parent_clock(Clock::riak_dt_vclock:vclock(), ORSet::orset()) -> orset()

precondition_context/1

precondition_context(ORDict::orset()) -> orset()

the precondition context is a fragment of the CRDT that operations with pre-conditions can be applied too. In the case of OR-Sets this is the set of adds observed. The system can then apply a remove to this context and merge it with a replica. Especially useful for hybrid op/state systems where the context of an operation is needed at a replica without sending the entire state to the client.

stat/2

stat(X1::atom(), ORSet::orset()) -> number() | undefined

stats/1

stats(ORSet::orset()) -> [{atom(), number()}]

to_binary/1

to_binary(ORSet::orset()) -> binary_orset()

to_binary/2

to_binary(Vers::pos_integer(), Set::orset()) -> {ok, binary_orset()} | {error, unsupported_version, Vers::pos_integer()}

to_version/2

to_version(Version::pos_integer(), Set::orset()) -> orset()

update/3

update(X1::orset_op(), Actor::actor(), ORDict::orset()) -> {ok, orset()} | {error, {precondition, {not_present, member()}}}

update/4

update(Op::orset_op(), Actor::actor(), ORDict::orset(), Ctx::riak_dt:context()) -> {ok, orset()} | {error, {precondition, {not_present, member()}}}

value/1

value(ORDict0::orset()) -> [member()]

value/2

value(X1::any(), ORSet::orset()) -> [member()] | orddict:orddict()


Generated by EDoc