Behaviours: riakc_datatype.
Encapsulates a register data-type that stores an opaque binary value with last-write-wins semantics. Like the other eventually-consistent types, the original fetched value is unmodified by setting the register. Instead, the new value is captured for later application in Riak.
Registers are only available as values in maps.abstract datatype: register()
register_op() = {assign, binary()}
is_type/1 | Determines whether the passed term is a register container. |
new/0 | Creates a new, empty register container type. |
new/1 | Creates a new register type with the passed context. |
new/2 | Creates a new register with the specified value and context. |
set/2 | Sets the value of the register. |
to_op/1 | Extracts an operation from the register that can be encoded into an update request. |
type/0 | Returns the symbolic name of this container. |
value/1 | Extracts the value of the register. |
is_type(T::term()) -> boolean()
Determines whether the passed term is a register container.
new() -> register()
Creates a new, empty register container type.
new(Context::riakc_datatype:context()) -> register()
Creates a new register type with the passed context. It's ignored, but we need this constructor for new nested (in maps) objects on the fly
new(Value::binary(), Context::riakc_datatype:context()) -> register()
Creates a new register with the specified value and context.
set(Value::binary(), Register::register()) -> register()
Sets the value of the register.
to_op(Register::register()) -> riakc_datatype:update(register_op())
Extracts an operation from the register that can be encoded into an update request.
type() -> atom()
Returns the symbolic name of this container.
value(Register::register()) -> binary() | undefined
Extracts the value of the register.
Generated by EDoc, Dec 16 2016, 16:38:08.