#Module gproc_dist#
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
Extended process registry.
__Behaviours:__ [`gen_leader`](/Users/uwiger/FL/git/gproc/deps/gen_leader/doc/gen_leader.md).
__Authors:__ Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).
##Description##
This module implements an extended process registry
For a detailed description, see gproc/doc/erlang07-wiger.pdf.
##Function Index##
##Function Details##
###code_change/4##
`code_change(FromVsn, S, Extra, E) -> any()`
###elected/2##
`elected(S, E) -> any()`
###elected/3##
`elected(S, E, Node) -> any()`
###from_leader/3##
`from_leader(Ops, S, E) -> any()`
###get_leader/0##
get_leader() -> node()
Returns the node of the current gproc leader.
###give_away/2##
`give_away(Key, To) -> any()`
###handle_DOWN/3##
`handle_DOWN(Node, S, E) -> any()`
###handle_call/4##
`handle_call(X1, X2, S, E) -> any()`
###handle_cast/3##
`handle_cast(Msg, S, X3) -> any()`
###handle_info/2##
`handle_info(X1, S) -> any()`
###handle_leader_call/4##
`handle_leader_call(X1, From, State, E) -> any()`
###handle_leader_cast/3##
`handle_leader_cast(X1, S, E) -> any()`
###init/1##
`init(Opts) -> any()`
###leader_call/1##
`leader_call(Req) -> any()`
###leader_cast/1##
`leader_cast(Msg) -> any()`
###mreg/2##
`mreg(T, KVL) -> any()`
###munreg/2##
`munreg(T, Keys) -> any()`
###reg/1##
`reg(Key) -> any()`
###reg/2##
`reg(Key, Value) -> any()`
Class = n - unique name
| p - non-unique property
| c - counter
| a - aggregated counter
Scope = l | g (global or local)
###reg_shared/2##
`reg_shared(Key, Value) -> any()`
###reset_counter/1##
`reset_counter(Key) -> any()`
###set_value/2##
`set_value(Key, Value) -> any()`
###start_link/0##
`start_link() -> any()`
###start_link/1##
`start_link(Nodes) -> any()`
###surrendered/3##
`surrendered(S, X2, E) -> any()`
###sync/0##
sync() -> true
Synchronize with the gproc leader
This function can be used to ensure that data has been replicated from the
leader to the current node. It does so by asking the leader to ping all
live participating nodes. The call will return `true` when all these nodes
have either responded or died. In the special case where the leader dies
during an ongoing sync, the call will fail with a timeout exception.
(Actually, it should be a `leader_died` exception; more study needed to find
out why gen_leader times out in this situation, rather than reporting that
the leader died.)
###terminate/2##
`terminate(Reason, S) -> any()`
###unreg/1##
`unreg(Key) -> any()`
###unreg_shared/1##
`unreg_shared(Key) -> any()`
###update_counter/2##
`update_counter(Key, Incr) -> any()`
###update_shared_counter/2##
`update_shared_counter(Key, Incr) -> any()`