Module mero

Behaviours: application.

Data Types

cas_token()

cas_token() = undefined | integer()

cluster_config()

cluster_config() = [{ClusterName::atom(), Config::proplists:proplist()}]

extended_result()

extended_result() = {Key::binary(), Value::undefined | binary(), CAS::cas_token()}

{ClusteringKey, Key}. ClusteringKey is used to select the memcached node where to store the data, and Key is used to store the data in that node. If a single binary Key is used, then ClusteringKey = Key.

mero_key()

mero_key() = binary() | {ClusteringKey::binary(), Key::binary()}

result()

result() = {Key::binary(), Value::undefined | binary()}

Function Index

add/5
cas/6
clustering_key/1
deep_state/0 Returns the state of the sockets for all clusters.
deep_state/1
delete/3
flush_all/1
get/2
get/3
gets/2
gets/3
increment_counter/2 Increments a counter: initial value is 1, steps of 1, timeout defaults to 24 hours.
increment_counter/7
madd/3
mcas/3
mdelete/3
mget/2
mget/3
mgets/2
mgets/3
mincrement_counter/2
mset/3
set/5
shard_crc32/2
shard_phash2/2
start/0
start/2 Starts the application.
state/0 Returns the state of the sockets for all clusters.
state/1 Returns the state of the sockets of a Cluster.
stop/1
storage_key/1

Function Details

add/5

add(ClusterName::atom(), Key::mero_key(), Value::binary(), ExpTime::integer(), Timeout::integer()) -> ok | {error, Reason::term()}

cas/6

cas(ClusterName::atom(), Key::mero_key(), Value::binary(), ExpTime::integer(), Timeout::integer(), CAS::cas_token()) -> ok | {error, Reason::term()}

clustering_key/1

clustering_key(Key::mero_key()) -> binary()

deep_state/0

deep_state() -> any()

Returns the state of the sockets for all clusters

deep_state/1

deep_state(ClusterName) -> any()

delete/3

delete(ClusterName::atom(), Key::mero_key(), Timeout::integer()) -> ok | {error, Reason::term()}

flush_all/1

flush_all(ClusterName::atom()) -> [ok | {error, Response::term()}]

get/2

get(ClusterName, Key) -> any()

get/3

get(ClusterName::atom(), Key::mero_key(), Timeout::integer()) -> result() | {error, Reason::term()}

gets/2

gets(ClusterName, Key) -> any()

gets/3

gets(ClusterName::atom(), Key::mero_key(), Timeout::integer()) -> extended_result() | {error, Reason::term()}

increment_counter/2

increment_counter(ClusterName::atom(), Key::mero_key()) -> {ok, integer()} | {error, Reason::term()}

Increments a counter: initial value is 1, steps of 1, timeout defaults to 24 hours. 3 retries.

increment_counter/7

increment_counter(ClusterName::atom(), Key::mero_key(), Value::integer(), Initial::integer(), ExpTime::integer(), Retries::integer(), Timeout::integer()) -> {ok, integer()} | {error, Reason::term()}

madd/3

madd(ClusterName::atom(), KVEs::[{Key::mero_key(), Value::binary(), ExpTime::integer()}], Timeout::integer()) -> [ok | {error, Reason::term()}]

mcas/3

mcas(ClusterName::atom(), KVECs::[{Key::mero_key(), Value::binary(), ExpTime::integer(), CAS::cas_token()}], Timeout::integer()) -> [ok | {error, Reason::term()}]

mdelete/3

mdelete(ClusterName::atom(), Keys::[mero_key()], Timeout::integer()) -> ok

mget/2

mget(ClusterName, Keys) -> any()

mget/3

mget(ClusterName::atom(), Keys::[mero_key()], Timeout::integer()) -> [result()] | {error, [Reason::term()], ProcessedKeyValues::[result()]}

mgets/2

mgets(ClusterName, Keys) -> any()

mgets/3

mgets(ClusterName::atom(), Keys::[mero_key()], Timeout::integer()) -> [extended_result()] | {error, [Reason::term()], ProcessedKeyValues::[extended_result()]}

mincrement_counter/2

mincrement_counter(ClusterName::atom(), Key::[mero_key()]) -> ok | {error, Reason::term()}

mset/3

mset(ClusterName::atom(), KVEs::[{Key::mero_key(), Value::binary(), ExpTime::integer()}], Timeout::integer()) -> [ok | {error, Reason::term()}]

set/5

set(ClusterName::atom(), Key::mero_key(), Value::binary(), ExpTime::integer(), Timeout::integer()) -> ok | {error, Reason::term()}

shard_crc32/2

shard_crc32(Key::binary(), ShardSize::pos_integer()) -> pos_integer()

shard_phash2/2

shard_phash2(Key::binary(), ShardSize::pos_integer()) -> pos_integer()

start/0

start() -> any()

start/2

start(StartType, StartArgs) -> any()

Starts the application

state/0

state() -> any()

Returns the state of the sockets for all clusters

state/1

state(ClusterName) -> any()

Returns the state of the sockets of a Cluster

stop/1

stop(State) -> any()

storage_key/1

storage_key(Key::mero_key()) -> binary()


Generated by EDoc