Module lasp_ets_storage_backend

Behaviours: gen_server, lasp_storage_backend.

Data Types

id()

id() = binary() | {binary(), type()}

metadata()

metadata() = orddict:orddict()

pending_threshold()

pending_threshold() = {threshold, read | wait, pid(), type(), threshold()}

ref()

ref() = atom()

store()

store() = ets:tid() | atom() | reference() | pid()

threshold()

threshold() = value() | {strict, value()}

type()

type() = term()

value()

value() = term()

variable()

variable() = #dv{value = value(), waiting_delta_threads = [pending_threshold()], waiting_threads = [pending_threshold()], lazy_threads = [pending_threshold()], type = type(), metadata = metadata(), delta_counter = non_neg_integer(), delta_map = orddict:orddict(), delta_ack_map = orddict:orddict()}

Function Index

fold/3Fold operation.
get/2Retrieve a record from the backend.
put/3Write a record to the backend.
reset/1Reset all application state.
start_link/1Start and link to calling process.
update/3In-place update given a mutation function.
update_all/2Update all objects given a mutation function.

Function Details

fold/3

fold(Ref::store(), Function::function(), Acc::term()) -> {ok, term()}

Fold operation.

get/2

get(Ref::ref(), Id::id()) -> {ok, variable()} | {error, not_found} | {error, atom()}

Retrieve a record from the backend.

put/3

put(Ref::ref(), Id::id(), Record::variable()) -> ok | {error, atom()}

Write a record to the backend.

reset/1

reset(Ref::store()) -> ok

Reset all application state.

start_link/1

start_link(Identifier::atom()) -> {ok, pid()}

Start and link to calling process.

update/3

update(Ref::ref(), Id::id(), Function::function()) -> {ok, any()} | error | {error, atom()}

In-place update given a mutation function.

update_all/2

update_all(Ref::ref(), Function::function()) -> {ok, term()}

Update all objects given a mutation function.


Generated by EDoc