Module gproc ============ #Module gproc# * [Description](#description) * [Data Types](#types) * [Function Index](#index) * [Function Details](#functions) Extended process registry. __Behaviours:__ [`gen_server`](gen_server.html). __Authors:__ Ulf Wiger ([`ulf.wiger@erlang-consulting.com`](mailto:ulf.wiger@erlang-consulting.com)). ##Description## Extended process registry This module implements an extended process registry For a detailed description, see [erlang07-wiger.pdf](erlang07-wiger.pdf). ##Data Types## ###context()## `context() = {[scope()](#type-scope), [type()](#type-type)} | [type()](#type-type)` Local scope is the default ###headpat()## `headpat() = {[keypat()](#type-keypat), [pidpat()](#type-pidpat), ValPat}` ###key()## `key() = {[type()](#type-type), [scope()](#type-scope), any()}` ###keypat()## `keypat() = {[sel_type()](#type-sel_type) | [sel_var()](#type-sel_var), l | g | [sel_var()](#type-sel_var), any()}` ###pidpat()## `pidpat() = pid() | [sel_var()](#type-sel_var)` sel_var() = DollarVar | '_'. ###scope()## `scope() = l | g` l = local registration; g = global registration ###sel_pattern()## `sel_pattern() = [{[headpat()](#type-headpat), Guards, Prod}]` ###sel_type()## `sel_type() = n | p | c | a | names | props | counters | aggr_counters` ###type()## `type() = n | p | c | a` n = name; p = property; c = counter; a = aggregate_counter ##Function Index##
add_global_aggr_counter/1 | Registers a global (unique) aggregated counter. |
add_global_counter/2 | Registers a global (non-unique) counter. |
add_global_name/1 | Registers a global (unique) name. |
add_global_property/2 | Registers a global (non-unique) property. |
add_local_aggr_counter/1 | Registers a local (unique) aggregated counter. |
add_local_counter/2 | Registers a local (non-unique) counter. |
add_local_name/1 | Registers a local (unique) name. |
add_local_property/2 | Registers a local (non-unique) property. |
audit_process/1 | |
await/1 | Equivalent to await(Key, infinity). |
await/2 | Wait for a local name to be registered. |
cancel_wait/2 | |
default/1 | |
first/1 | Behaves as ets:first(Tab) for a given type of registration object. |
get_value/1 | Read the value stored with a key registered to the current process. |
info/1 | Similar to process_info(Pid) but with additional gproc info. |
info/2 | Similar to process_info(Pid, Item), but with additional gproc info. |
last/1 | Behaves as ets:last(Tab) for a given type of registration object. |
lookup_global_aggr_counter/1 | Lookup a global (unique) aggregated counter and returns its value. |
lookup_global_counters/1 | Look up all global (non-unique) instances of a given Counter. |
lookup_global_name/1 | Lookup a global unique name. |
lookup_global_properties/1 | Look up all global (non-unique) instances of a given Property. |
lookup_local_aggr_counter/1 | Lookup a local (unique) aggregated counter and returns its value. |
lookup_local_counters/1 | Look up all local (non-unique) instances of a given Counter. |
lookup_local_name/1 | Lookup a local unique name. |
lookup_local_properties/1 | Look up all local (non-unique) instances of a given Property. |
lookup_pid/1 | Lookup the Pid stored with a key. |
lookup_pids/1 | Returns a list of pids with the published key Key. |
lookup_values/1 | Retrieve the {Pid,Value} pairs corresponding to Key. |
mreg/3 | Register multiple {Key,Value} pairs of a given type and scope. |
nb_wait/1 | Wait for a local name to be registered. |
next/2 | Behaves as ets:next(Tab,Key) for a given type of registration object. |
prev/2 | Behaves as ets:prev(Tab,Key) for a given type of registration object. |
reg/1 | Equivalent to reg(Key, default(Key)). |
reg/2 | Register a name or property for the current process. |
select/1 | Equivalent to select(all, Pat). |
select/2 | Perform a select operation on the process registry. |
select/3 | Like select/2 but returns Limit objects at a time. |
send/2 | Sends a message to the process, or processes, corresponding to Key. |
set_value/2 | Sets the value of the registeration entry given by Key. |
start_link/0 | Starts the gproc server. |
table/1 | Equivalent to table(Context, []). |
table/2 | QLC table generator for the gproc registry. |
unreg/1 | Unregister a name or property. |
update_counter/2 | Updates the counter registered as Key for the current process. |
where/1 | Returns the pid registered as Key. |