Module ets_cache

Behaviours: gen_server.

Authors: Evgeny Khramtsov (ekhramtsov@process-one.net).

Data Types

counter()

counter() = non_neg_integer()

filter_fun()

filter_fun() = fun((any(), {ok, any()} | error) -> boolean())

fold_fun()

fold_fun() = fun((any(), {ok, any()} | error, any()) -> any())

milli_seconds()

milli_seconds() = pos_integer()

option()

option() = {max_size, pos_integer() | infinity} | {life_time, milli_seconds() | infinity} | {cache_missed, boolean()} | {type, set | ordered_set | bag | duplicate_bag}

read_fun()

read_fun() = fun(() -> {ok, any()} | error)

tag()

tag() = cache | nocache

update_fun()

update_fun() = fun(() -> ok | {ok, any()} | error)

Function Index

all/0
clean/1
clean/2
clear/1
clear/2
code_change/3
delete/1
delete/2
delete/3
delete_counter/1
delete_counter_nif/1
filter/2
fold/3
get_counter/1
get_counter_nif/1
handle_call/3
handle_cast/2
handle_info/2
incr/3
incr/4
incr_counter/1
incr_counter_nif/1
info/1
info/2
init/1
insert/3
insert/4
insert_new/3
insert_new/4
lookup/2
lookup/3
match_delete/2
match_delete/3
new/1
new/2
new_counter/0
new_counter_nif/0
setopts/2
start_link/2
terminate/2
untag/1
update/4
update/5

Function Details

all/0

all() -> [atom()]

clean/1

clean(Name::atom()) -> ok

clean/2

clean(Name::atom(), Nodes::[node()]) -> ok

clear/1

clear(Name::atom()) -> ok

clear/2

clear(Name::atom(), Nodes::[atom()]) -> ok

code_change/3

code_change(OldVsn, State, Extra) -> any()

delete/1

delete(Name::atom()) -> ok

delete/2

delete(Name::atom(), Key::any()) -> ok

delete/3

delete(Name::atom(), Key::any(), Nodes::[atom()]) -> ok

delete_counter/1

delete_counter(Name::counter()) -> ok

delete_counter_nif/1

delete_counter_nif(X1::counter()) -> ok

filter/2

filter(Name::atom(), FilterFun::filter_fun()) -> non_neg_integer()

fold/3

fold(FoldFun::fold_fun(), Acc::any(), Name::atom()) -> any()

get_counter/1

get_counter(Name::atom()) -> non_neg_integer()

get_counter_nif/1

get_counter_nif(X1::counter()) -> non_neg_integer()

handle_call/3

handle_call(Request, From, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(Info, State) -> any()

incr/3

incr(Name::atom(), Key::any(), Incr::non_neg_integer()) -> ok

incr/4

incr(Name::atom(), Key::any(), Incr::non_neg_integer(), Nodes::[node()]) -> ok

incr_counter/1

incr_counter(Name::atom()) -> non_neg_integer()

incr_counter_nif/1

incr_counter_nif(X1::counter()) -> non_neg_integer()

info/1

info(Name::atom()) -> [proplists:property()]

info/2

info(Name::atom(), Option::atom()) -> any()

init/1

init(X1) -> any()

insert/3

insert(Name::atom(), Key::any(), Val::any()) -> boolean()

insert/4

insert(Name::atom(), Key::any(), Val::any(), Nodes::[node()]) -> boolean()

insert_new/3

insert_new(Name::atom(), Key::any(), Val::any()) -> boolean()

insert_new/4

insert_new(Name::atom(), Key::any(), Val::any(), Nodes::[node()]) -> boolean()

lookup/2

lookup(Name::atom(), Key::any()) -> {ok, any()} | any()

lookup/3

lookup(Name::atom(), Key::any(), Return::read_fun() | term()) -> {ok, any()} | any()

match_delete/2

match_delete(Name::atom(), Match::any()) -> ok

match_delete/3

match_delete(Name::atom(), Match::any(), Nodes::[atom()]) -> ok

new/1

new(Name::atom()) -> ok

new/2

new(Name::atom(), Opts::[option()]) -> ok

new_counter/0

new_counter() -> counter()

new_counter_nif/0

new_counter_nif() -> {ok, counter()} | {error, {system_limit, pos_integer()}}

setopts/2

setopts(Name::atom(), Opts::[option()]) -> ok

start_link/2

start_link(Name, Opts) -> any()

terminate/2

terminate(Reason, State) -> any()

untag/1

untag(Val::term()) -> term()

update/4

update(Name::atom(), Key::any(), Val::{ok, any()} | error, UpdateFun::update_fun()) -> ok | any()

update/5

update(Name::atom(), Key::any(), Val::{ok, any()} | error, UpdateFun::update_fun(), Nodes::[node()]) -> ok | any()


Generated by EDoc