Behaviours: riakc_datatype.
abstract datatype: counter()
counter_op() = {increment, integer()}
decrement/1 | Decrements the counter by 1. |
decrement/2 | Decrements the counter by the passed amount. |
increment/1 | Increments the counter by 1. |
increment/2 | Increments the counter by the passed amount. |
is_type/1 | Determines whether the passed term is a counter container. |
new/0 | Creates a new counter type with a value of 0. |
new/1 | Creates a new counter type with the passed context. |
new/2 | Creates a new counter type with the passed integer and context. |
to_op/1 | Extracts the changes to this counter as an operation. |
type/0 | Returns the symbolic name of this container. |
value/1 | Gets the original value of the counter. |
Decrements the counter by 1.
Decrements the counter by the passed amount.
Increments the counter by 1.
Increments the counter by the passed amount.
is_type(T::term()) -> boolean()
Determines whether the passed term is a counter container.
new() -> counter()
Creates a new counter type with a value of 0.
new(Context::riakc_datatype:context()) -> counter()
Creates a new counter type with the passed context. It's ignored, but we need this constructor for new nested (in maps) objects on the fly
new(Value::integer(), Context::riakc_datatype:context()) -> counter()
Creates a new counter type with the passed integer and context.
to_op(Counter::counter()) -> riakc_datatype:update(counter_op())
Extracts the changes to this counter as an operation.
type() -> atom()
Returns the symbolic name of this container.
value(Counter::counter()) -> integer()
Gets the original value of the counter.
Generated by EDoc, Dec 16 2016, 16:38:08.