Behaviours: riak_dt.
abstract datatype: od_flag()
od_flag_op() = enable | disable
| equal/2 | |
| from_binary/1 | |
| merge/2 | |
| new/0 | |
| parent_clock/2 | sets the clock in the flag to that Clock. |
| precondition_context/1 | the 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/4 | update/4 is similar to update/3 except that it takes a
context (obtained from calling precondition_context/1). |
| value/1 | |
| value/2 |
from_binary(B::binary()) -> {ok, od_flag()} | {error, unsupported_version, Vers::pos_integer()} | {error, invalid_binary}
new() -> od_flag()
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(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(X1::atom(), X2::od_flag()) -> number() | undefined
stats(ODF::od_flag()) -> [{atom(), integer()}]
to_binary(Flag::od_flag()) -> binary()
to_binary(Vers::pos_integer(), Flag::od_flag()) -> {ok, binary()} | {error, unsupported_version, Vers::pos_integer()}
update(X1::od_flag_op(), Dot::riak_dt:actor() | riak_dt:dot(), Flag::od_flag()) -> {ok, od_flag()}
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(X1::od_flag()) -> boolean()
value(X1::term(), Flag::od_flag()) -> boolean()
Generated by EDoc