View Source shards_partition (shards v1.1.1)

Partition Owner.

The partition owner is a gen_server that creates and holds the ETS table associated with the partition.

Summary

Functions

Link to this function

apply_ets_fun(Pid, EtsFun, Args)

View Source
-spec apply_ets_fun(Pid :: pid(), EtsFun :: atom(), Args :: [term()]) -> term().
-spec compute(Key :: term(), Meta :: shards_meta:t()) -> non_neg_integer().
Link to this function

handle_call(Request, From, State)

View Source
Link to this function

handle_cast(Request, State)

View Source
Link to this function

handle_info(Reason, State)

View Source
-spec pid(Tab :: shards:tab(), Partition :: non_neg_integer()) -> pid().
-spec retrieve_tab(Pid :: pid()) -> atom() | ets:tid().
Link to this function

start_link(Tab, PartitionedTablePid, PartitionIndex, Options)

View Source
-spec start_link(Tab :: atom() | ets:tid(),
                 PartitionedTablePid :: pid(),
                 PartitionIndex :: non_neg_integer(),
                 Options :: [term()]) ->
                    {ok, pid()} | ignore | {error, term()}.

Equivalent to stop(Server, 5000).

-spec stop(Pid :: pid(), Timeout :: timeout()) -> ok.
-spec tid(Tab :: shards:tab(), Partition :: non_neg_integer()) -> ets:tid().
-spec tid(Tab :: shards:tab(), Key :: term(), Meta :: shards_meta:t()) -> ets:tid().