Module riak_dt_od_flag

Behaviours: riak_dt.

Data Types

od_flag()

abstract datatype: od_flag()

od_flag_op()

od_flag_op() = enable | disable

Function Index

equal/2
from_binary/1
merge/2
new/0
parent_clock/2sets the clock in the flag to that Clock.
precondition_context/1the precondition_context is an opaque piece of state that can be used for context operations to ensure only observed state is affected.
stat/2
stats/1
to_binary/1
to_binary/2
to_version/2
update/3
update/4update/4 is similar to update/3 except that it takes a context (obtained from calling precondition_context/1).
value/1
value/2

Function Details

equal/2

equal(X1::od_flag(), X2::od_flag()) -> boolean()

from_binary/1

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

merge/2

merge(X1::od_flag(), X2::od_flag()) -> od_flag()

new/0

new() -> od_flag()

parent_clock/2

parent_clock(Clock::riak_dt_vclock:vclock(), X2::od_flag()) -> od_flag()

sets the clock in the flag to that Clock. Used by a containing Map for sub-CRDTs

precondition_context/1

precondition_context(X1::od_flag()) -> riak_dt:context()

the precondition_context is an opaque piece of state that can be used for context operations to ensure only observed state is affected.

See also: update/4.

stat/2

stat(X1::atom(), X2::od_flag()) -> number() | undefined

stats/1

stats(ODF::od_flag()) -> [{atom(), integer()}]

to_binary/1

to_binary(Flag::od_flag()) -> binary()

to_binary/2

to_binary(Vers::pos_integer(), Flag::od_flag()) -> {ok, binary()} | {error, unsupported_version, Vers::pos_integer()}

to_version/2

to_version(Version::pos_integer(), Flag::od_flag()) -> od_flag()

update/3

update(X1::od_flag_op(), Dot::riak_dt:actor() | riak_dt:dot(), Flag::od_flag()) -> {ok, od_flag()}

update/4

update(Op::od_flag_op(), Actor::riak_dt:actor() | riak_dt:dot(), Flag::od_flag(), Ctx::riak_dt:context()) -> {ok, od_flag()}

update/4 is similar to update/3 except that it takes a context (obtained from calling precondition_context/1). This context ensure that a disable operation does not disable a flag that is has not been seen` enabled by the caller. For example, the flag has been enabled by `a, b, and c. The user has a copy of the flag obtained by reading a. Subsequently all replicas merge, and the user sends a disable operation. The have only seen the enable of a, yet they disable the concurrecnt b and c operations, unless they send a context obtained from a.

value/1

value(X1::od_flag()) -> boolean()

value/2

value(X1::term(), Flag::od_flag()) -> boolean()


Generated by EDoc