Module shards

Shards is split into 4 main components:.

See also: shards_dist, shards_local.

Description

Shards is split into 4 main components:

Data Types

continuation()

continuation() = shards_local:continuation()

Function Index

all/0Equivalent to shards_local:all / 0.
delete/1 Wrapper to shards_local:delete/1 and shards_dist:delete/1.
delete/2 Wrapper to shards_local:delete/3 and shards_dist:delete/3.
delete_all_objects/1 Wrapper to shards_local:delete_all_objects/2 and shards_dist:delete_all_objects/2.
delete_object/2 Wrapper to shards_local:delete_object/3 and shards_dist:delete_object/3.
file2tab/1Equivalent to file2tab(Filename, []).
file2tab/2 Wrapper to shards_local:file2tab/2 and shards_dist:file2tab/2.
first/1 Wrapper to shards_local:first/2 and shards_dist:first/2.
foldl/3 Wrapper to shards_local:foldl/4 and shards_dist:foldl/4.
foldr/3 Wrapper to shards_local:foldr/4 and shards_dist:foldr/4.
get_nodes/1
give_away/3 Wrapper to shards_local:give_away/4 and shards_dist:give_away/4.
i/0Equivalent to shards_local:i / 0.
info/1 Wrapper to shards_local:info/2 and shards_dist:info/2.
info/2 Wrapper to shards_local:info/3 and shards_dist:info/3.
info_shard/1Equivalent to shards_local:info_shard / 1.
info_shard/2Equivalent to shards_local:info_shard / 2.
insert/2 Wrapper to shards_local:insert/3 and shards_dist:insert/3.
insert_new/2 Wrapper to shards_local:insert_new/3 and shards_dist:insert_new/3.
is_compiled_ms/1Equivalent to shards_local:is_compiled_ms / 1.
join/2
last/1 Wrapper to shards_local:last/2 and shards_dist:last/2.
leave/2
list/1 Returns the list of shard names associated to the given TabName.
lookup/2 Wrapper to shards_local:lookup/3 and shards_dist:lookup/3.
lookup_element/3 Wrapper to shards_local:lookup_element/4 and shards_dist:lookup_element/4.
match/1 Wrapper to shards_local:match/2 and shards_dist:match/2.
match/2 Wrapper to shards_local:match/3 and shards_dist:match/3.
match/3 Wrapper to shards_local:match/4 and shards_dist:match/4.
match_delete/2 Wrapper to shards_local:match_delete/3 and shards_dist:match_delete/3.
match_object/1 Wrapper to shards_local:match_object/2 and shards_dist:match_object/2.
match_object/2 Wrapper to shards_local:match_object/3 and shards_dist:match_object/3.
match_object/3 Wrapper to shards_local:match_object/4 and shards_dist:match_object/4.
match_spec_compile/1Equivalent to shards_local:match_spec_compile / 1.
match_spec_run/2Equivalent to shards_local:match_spec_run / 2.
member/2 Wrapper to shards_local:member/3 and shards_dist:member/3.
new/2 Wrapper to shards_local:new/2 and shards_dist:new/2.
next/2 Wrapper to shards_local:next/3 and shards_dist:next/3.
prev/2 Wrapper to shards_local:prev/3 and shards_dist:prev/3.
rename/2 Wrapper to shards_local:rename/3 and shards_dist:rename/3.
safe_fixtable/2 Wrapper to shards_local:safe_fixtable/2 and shards_dist:safe_fixtable/2.
select/1 Wrapper to shards_local:select/2 and shards_dist:select/2.
select/2 Wrapper to shards_local:select/3 and shards_dist:select/3.
select/3 Wrapper to shards_local:select/4 and shards_dist:select/4.
select_count/2 Wrapper to shards_local:select_count/3 and shards_dist:select_count/3.
select_delete/2 Wrapper to shards_local:select_delete/3 and shards_dist:select_delete/3.
select_reverse/1 Wrapper to shards_local:select_reverse/2 and shards_dist:select_reverse/2.
select_reverse/2 Wrapper to shards_local:select_reverse/3 and shards_dist:select_reverse/3.
select_reverse/3 Wrapper to shards_local:select_reverse/4 and shards_dist:select_reverse/4.
setopts/2 Wrapper to shards_local:setopts/3 and shards_dist:setopts/3.
start/0Starts shards application.
state/1 Utility to get the state for the given table Tab.
stop/0Stops shards application.
tab2file/2Equivalent to tab2file(Tab, Filename, []).
tab2file/3 Wrapper to shards_local:tab2file/4 and shards_dist:tab2file/4.
tab2list/1 Wrapper to shards_local:tab2list/2 and shards_dist:tab2list/2.
tabfile_info/1 Wrapper to shards_local:tabfile_info/1 and shards_dist:tabfile_info/1.
table/1 Wrapper to shards_local:table/2 and shards_dist:table/2.
table/2 Wrapper to shards_local:table/3 and shards_dist:table/3.
take/2 Wrapper to shards_local:take/3 and shards_dist:take/3.
test_ms/2Equivalent to shards_local:test_ms / 2.
update_counter/3 Wrapper to shards_local:update_counter/4 and shards_dist:update_counter/4.
update_counter/4 Wrapper to shards_local:update_counter/5 and shards_dist:update_counter/5.
update_element/3 Wrapper to shards_local:update_element/4 and shards_dist:update_element/4.

Function Details

all/0

all() -> any()

Equivalent to shards_local:all / 0.

delete/1

delete(Tab::atom()) -> true

Wrapper to shards_local:delete/1 and shards_dist:delete/1.

See also: shards_dist:delete/1, shards_local:delete/1.

delete/2

delete(Tab::atom(), Key::term()) -> true

Wrapper to shards_local:delete/3 and shards_dist:delete/3.

See also: shards_dist:delete/3, shards_local:delete/3.

delete_all_objects/1

delete_all_objects(Tab::atom()) -> true

Wrapper to shards_local:delete_all_objects/2 and shards_dist:delete_all_objects/2.

See also: shards_dist:delete_all_objects/2, shards_local:delete_all_objects/2.

delete_object/2

delete_object(Tab::atom(), Object::tuple()) -> true

Wrapper to shards_local:delete_object/3 and shards_dist:delete_object/3.

See also: shards_dist:delete_object/3, shards_local:delete_object/3.

file2tab/1

file2tab(Filename) -> any()

Equivalent to file2tab(Filename, []).

file2tab/2

file2tab(Filename::shards_local:filename(), Options::[Option]) -> {ok, Tab::atom()} | {error, Reason::term()}

Wrapper to shards_local:file2tab/2 and shards_dist:file2tab/2.

See also: shards_dist:file2tab/2, shards_local:file2tab/2.

first/1

first(Tab::atom()) -> Key::term() | '$end_of_table'

Wrapper to shards_local:first/2 and shards_dist:first/2.

See also: shards_dist:first/2, shards_local:first/2.

foldl/3

foldl(Fun::fun((Element::term(), Acc) -> Acc), Acc::term(), Tab::atom()) -> Acc

Wrapper to shards_local:foldl/4 and shards_dist:foldl/4.

See also: shards_dist:foldl/4, shards_local:foldl/4.

foldr/3

foldr(Fun::fun((Element::term(), Acc) -> Acc), Acc::term(), Tab::atom()) -> Acc

Wrapper to shards_local:foldr/4 and shards_dist:foldr/4.

See also: shards_dist:foldr/4, shards_local:foldr/4.

get_nodes/1

get_nodes(Tab::atom()) -> Nodes::[node()]

give_away/3

give_away(Tab::atom(), Pid::pid(), GiftData::term()) -> true

Wrapper to shards_local:give_away/4 and shards_dist:give_away/4.

See also: shards_dist:give_away/4, shards_local:give_away/4.

i/0

i() -> any()

Equivalent to shards_local:i / 0.

info/1

info(Tab::atom()) -> InfoList | undefined

Wrapper to shards_local:info/2 and shards_dist:info/2.

See also: shards_dist:info/2, shards_local:info/2.

info/2

info(Tab::atom(), Item::shards_local:info_item() | nodes) -> any() | undefined

Wrapper to shards_local:info/3 and shards_dist:info/3.

See also: shards_dist:info/3, shards_local:info/3.

info_shard/1

info_shard(ShardTab) -> any()

Equivalent to shards_local:info_shard / 1.

info_shard/2

info_shard(ShardTab, Item) -> any()

Equivalent to shards_local:info_shard / 2.

insert/2

insert(Tab::atom(), ObjOrObjL::tuple() | [tuple()]) -> true

Wrapper to shards_local:insert/3 and shards_dist:insert/3.

See also: shards_dist:insert/3, shards_local:insert/3.

insert_new/2

insert_new(Tab::atom(), ObjOrObjL::tuple() | [tuple()]) -> boolean()

Wrapper to shards_local:insert_new/3 and shards_dist:insert_new/3.

See also: shards_dist:insert_new/3, shards_local:insert_new/3.

is_compiled_ms/1

is_compiled_ms(Term) -> any()

Equivalent to shards_local:is_compiled_ms / 1.

join/2

join(Tab::atom(), Nodes::[node()]) -> CurrentNodes::[node()]

last/1

last(Tab::atom()) -> Key::term() | '$end_of_table'

Wrapper to shards_local:last/2 and shards_dist:last/2.

See also: shards_dist:last/2, shards_local:last/2.

leave/2

leave(Tab::atom(), Nodes::[node()]) -> CurrentNodes::[node()]

list/1

list(Tab::atom()) -> Result::[atom()]

Returns the list of shard names associated to the given TabName. The shard names that were created in the shards:new/2,3 fun.

lookup/2

lookup(Tab::atom(), Key::term()) -> Result::[tuple()]

Wrapper to shards_local:lookup/3 and shards_dist:lookup/3.

See also: shards_dist:lookup/3, shards_local:lookup/3.

lookup_element/3

lookup_element(Tab::atom(), Key::term(), Pos::pos_integer()) -> Elem::term() | [term()]

Wrapper to shards_local:lookup_element/4 and shards_dist:lookup_element/4.

See also: shards_dist:lookup_element/4, shards_local:lookup_element/4.

match/1

match(Cont) -> {[Match::term()], Cont} | '$end_of_table'

Wrapper to shards_local:match/2 and shards_dist:match/2.

See also: shards_dist:match/2, shards_local:match/2.

match/2

match(Tab::atom(), Pattern::ets:match_pattern()) -> [Match::[term()]]

Wrapper to shards_local:match/3 and shards_dist:match/3.

See also: shards_dist:match/3, shards_local:match/3.

match/3

match(Tab::atom(), Pattern::ets:match_pattern(), Limit::pos_integer()) -> {[Match::term()], continuation()} | '$end_of_table'

Wrapper to shards_local:match/4 and shards_dist:match/4.

See also: shards_dist:match/4, shards_local:match/4.

match_delete/2

match_delete(Tab::atom(), Pattern::ets:match_pattern()) -> true

Wrapper to shards_local:match_delete/3 and shards_dist:match_delete/3.

See also: shards_dist:match_delete/3, shards_local:match_delete/3.

match_object/1

match_object(Cont) -> {[Match::term()], Cont} | '$end_of_table'

Wrapper to shards_local:match_object/2 and shards_dist:match_object/2.

See also: shards_dist:match_object/2, shards_local:match_object/2.

match_object/2

match_object(Tab::atom(), Pattern::ets:match_pattern()) -> [Object::tuple()]

Wrapper to shards_local:match_object/3 and shards_dist:match_object/3.

See also: shards_dist:match_object/3, shards_local:match_object/3.

match_object/3

match_object(Tab::atom(), Pattern::ets:match_pattern(), Limit::pos_integer()) -> {[Match::term()], continuation()} | '$end_of_table'

Wrapper to shards_local:match_object/4 and shards_dist:match_object/4.

See also: shards_dist:match_object/4, shards_local:match_object/4.

match_spec_compile/1

match_spec_compile(MatchSpec) -> any()

Equivalent to shards_local:match_spec_compile / 1.

match_spec_run/2

match_spec_run(List, CompiledMatchSpec) -> any()

Equivalent to shards_local:match_spec_run / 2.

member/2

member(Tab::atom(), Key::term()) -> boolean()

Wrapper to shards_local:member/3 and shards_dist:member/3.

See also: shards_dist:member/3, shards_local:member/3.

new/2

new(Name, Options::[shards_dist:option()]) -> Name

Wrapper to shards_local:new/2 and shards_dist:new/2.

See also: shards_dist:new/2, shards_local:new/2.

next/2

next(Tab::atom(), Key) -> Key | '$end_of_table'

Wrapper to shards_local:next/3 and shards_dist:next/3.

See also: shards_dist:next/3, shards_local:next/3.

prev/2

prev(Tab::atom(), Key) -> Key | '$end_of_table'

Wrapper to shards_local:prev/3 and shards_dist:prev/3.

See also: shards_dist:prev/3, shards_local:prev/3.

rename/2

rename(Tab::atom(), Name) -> Name | no_return()

Wrapper to shards_local:rename/3 and shards_dist:rename/3.

See also: shards_dist:rename/3, shards_local:rename/3.

safe_fixtable/2

safe_fixtable(Tab::atom(), Fix::boolean()) -> boolean()

Wrapper to shards_local:safe_fixtable/2 and shards_dist:safe_fixtable/2.

See also: safe_fixtable:select/2, safe_fixtable:select/2.

select/1

select(Cont) -> {[Match::term()], Cont} | '$end_of_table'

Wrapper to shards_local:select/2 and shards_dist:select/2.

See also: shards_dist:select/2, shards_local:select/2.

select/2

select(Tab::atom(), MatchSpec::ets:match_spec()) -> [Match::term()]

Wrapper to shards_local:select/3 and shards_dist:select/3.

See also: shards_dist:select/3, shards_local:select/3.

select/3

select(Tab::atom(), MatchSpec::ets:match_spec(), Limit::pos_integer()) -> {[Match::term()], continuation()} | '$end_of_table'

Wrapper to shards_local:select/4 and shards_dist:select/4.

See also: shards_dist:select/4, shards_local:select/4.

select_count/2

select_count(Tab::atom(), MatchSpec::ets:match_spec()) -> NumMatched::non_neg_integer()

Wrapper to shards_local:select_count/3 and shards_dist:select_count/3.

See also: shards_dist:select_count/3, shards_local:select_count/3.

select_delete/2

select_delete(Tab::atom(), MatchSpec::ets:match_spec()) -> NumDeleted::non_neg_integer()

Wrapper to shards_local:select_delete/3 and shards_dist:select_delete/3.

See also: shards_dist:select_delete/3, shards_local:select_delete/3.

select_reverse/1

select_reverse(Cont) -> {[Match::term()], Cont} | '$end_of_table'

Wrapper to shards_local:select_reverse/2 and shards_dist:select_reverse/2.

See also: shards_dist:select_reverse/2, shards_local:select_reverse/2.

select_reverse/2

select_reverse(Tab::atom(), MatchSpec::ets:match_spec()) -> [Match::term()]

Wrapper to shards_local:select_reverse/3 and shards_dist:select_reverse/3.

See also: shards_dist:select_reverse/3, shards_local:select_reverse/3.

select_reverse/3

select_reverse(Tab::atom(), MatchSpec::ets:match_spec(), Limit::pos_integer()) -> {[Match::term()], continuation()} | '$end_of_table'

Wrapper to shards_local:select_reverse/4 and shards_dist:select_reverse/4.

See also: shards_dist:select_reverse/4, shards_local:select_reverse/4.

setopts/2

setopts(Tab::atom(), Opts::Opt | [Opt]) -> boolean()

Wrapper to shards_local:setopts/3 and shards_dist:setopts/3.

See also: shards_dist:setopts/3, shards_local:setopts/3.

start/0

start() -> ok | {error, term()}

Starts shards application.

state/1

state(Tab::atom()) -> shards_state:state()

Utility to get the state for the given table Tab.

stop/0

stop() -> ok | {error, term()}

Stops shards application.

tab2file/2

tab2file(Tab, Filename) -> any()

Equivalent to tab2file(Tab, Filename, []).

tab2file/3

tab2file(Tab::atom(), Filename::shards_local:filename(), Options::[Option]) -> ok | {error, Reason::term()}

Wrapper to shards_local:tab2file/4 and shards_dist:tab2file/4.

See also: shards_dist:tab2file/4, shards_local:tab2file/4.

tab2list/1

tab2list(Tab::atom()) -> [Object::tuple()]

Wrapper to shards_local:tab2list/2 and shards_dist:tab2list/2.

See also: shards_dist:tab2list/2, shards_local:tab2list/2.

tabfile_info/1

tabfile_info(Filename::shards_local:filename()) -> {ok, TableInfo} | {error, Reason::term()}

Wrapper to shards_local:tabfile_info/1 and shards_dist:tabfile_info/1.

See also: shards_dist:tabfile_info/1, shards_local:tabfile_info/1.

table/1

table(Tab::atom()) -> [QueryHandle::qlc:query_handle()]

Wrapper to shards_local:table/2 and shards_dist:table/2.

See also: shards_dist:table/2, shards_local:table/2.

table/2

table(Tab::atom(), Options::[Option] | Option) -> [qlc:query_handle()]

Wrapper to shards_local:table/3 and shards_dist:table/3.

See also: shards_dist:table/3, shards_local:table/3.

take/2

take(Tab::atom(), Key::term()) -> [Object::tuple()]

Wrapper to shards_local:take/3 and shards_dist:take/3.

See also: shards_dist:take/3, shards_local:take/3.

test_ms/2

test_ms(Tuple, MatchSpec) -> any()

Equivalent to shards_local:test_ms / 2.

update_counter/3

update_counter(Tab::atom(), Key::term(), UpdateOp::term()) -> integer() | [integer()]

Wrapper to shards_local:update_counter/4 and shards_dist:update_counter/4.

See also: shards_dist:update_counter/4, shards_local:update_counter/4.

update_counter/4

update_counter(Tab::atom(), Key::term(), UpdateOp::term(), Default::tuple()) -> integer() | [integer()]

Wrapper to shards_local:update_counter/5 and shards_dist:update_counter/5.

See also: shards_dist:update_counter/5, shards_local:update_counter/5.

update_element/3

update_element(Tab::atom(), Key::term(), ElemSpec::{Pos, Value} | [{Pos, Value}]) -> boolean()

Wrapper to shards_local:update_element/4 and shards_dist:update_element/4.

See also: shards_dist:update_element/4, shards_local:update_element/4.


Generated by EDoc