kv_list() = [{any(), any()}]
| get_pid/1 |
Returns the PID associated to the Name. |
| iterator/1 |
Returns a sequence of integers that starts with 0 and contains the
successive results of adding +1 to the previous element, until
NumShards is reached or passed (in the latter case, NumShards
is not an element of the sequence). |
| key_from_object/1 | Returns the key for the given object or list of objects. |
| keyfind/2 | Equivalent to keyfind(Key, KVList, undefined).
|
| keyfind/3 |
Returns the value to the given Key or Default if it doesn't exist. |
| keyupdate/3 | Equivalent to keyupdate(Fun, Keys, undefined, TupleList).
|
| keyupdate/4 |
Updates the given Keys by the result of calling Fun(OldValue). |
| list_shards/2 |
Returns the list of shard names associated to the given TabName. |
| pick/3 |
Pick/computes the shard where the Key will be handled. |
| read_tabfile/1 | Reads the file info related to a tabfile saved previously. |
| reduce_while/3 |
Reduces the List until fun returns {halt, any()}'. |
| shard_name/2 |
Builds a shard name ShardName. |
| to_string/1 | Converts the input data to a string. |
| write_tabfile/2 | Writes to a file a content related to a table. |
get_pid(Name::atom()) -> pid() | no_return()
Returns the PID associated to the Name.
Name: Process name.iterator(StateOrNumShards::shards_state:state() | pos_integer()) -> Iterator::[integer()]
Returns a sequence of integers that starts with 0 and contains the
successive results of adding +1 to the previous element, until
NumShards is reached or passed (in the latter case, NumShards
is not an element of the sequence).
StateOrNumShards: A valid shards state or number of shards.key_from_object(ObjOrObjs::tuple() | [tuple()]) -> Key::any()
Returns the key for the given object or list of objects.
ObjOrObjs: Object or list of objects.keyfind(Key, KVList) -> any()
Equivalent to keyfind(Key, KVList, undefined).
keyfind(Key::term(), KVList::kv_list(), Default::term()) -> term()
Returns the value to the given Key or Default if it doesn't exist.
keyupdate(Fun, Keys, TupleList) -> any()
Equivalent to keyupdate(Fun, Keys, undefined, TupleList).
keyupdate(Fun::fun((Key::any(), Value::any()) -> any()), Keys::[any()], Init::any(), KVList1::kv_list()) -> KVList2::kv_list()
Updates the given Keys by the result of calling Fun(OldValue).
If Key doesn't exist, then Init is set.
list_shards(Tab::atom(), NumShards::pos_integer()) -> ShardNames::[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.
TabName: Table name.NumShards: Number of shards.pick(Key::shards_state:key(), Range::shards_state:range(), Op::atom()) -> Result::non_neg_integer()
Pick/computes the shard where the Key will be handled.
Key: The key to be hashed to calculate the shard.Range: Range/set – number of shards/nodes.Op: Operation type: r | w | d.Result: Returns a number between 0..Range-1.read_tabfile(Filename::shards_local:filename()) -> term() | no_return()
Reads the file info related to a tabfile saved previously.
reduce_while(Fun::fun((Elem::any(), Acc::any()) -> FunRes), AccIn::any(), ListOrMap::[any()] | map()) -> Result::any()
FunRes = {cont | halt, AccOut::any()}
Reduces the List until fun returns {halt, any()}'.
Fun: Function invoked for each element in List.AccIn: Initial accumulator.List: List (enumerable) to be reduced.Result: Accumulator.shard_name(Tab::atom(), Shard::non_neg_integer()) -> ShardName::atom()
Builds a shard name ShardName.
TabName: Table name from which the shard name is generated.Shard: Shard number – from 0 to (NumShards - 1)to_string(Data::any()) -> string() | no_return()
Converts the input data to a string.
write_tabfile(Filename::shards_local:filename(), Content::term()) -> ok | {error, term()}
Writes to a file a content related to a table.
Generated by EDoc