1mnesia_registry(3)         Erlang Module Definition         mnesia_registry(3)
2
3
4

NAME

6       mnesia_registry - Dump support for registries in erl_interface.
7

DESCRIPTION

9       This  module  is  usually part of the erl_interface application, but is
10       currently part of the Mnesia application.
11
12       This module is mainly intended for internal use within OTP, but it  has
13       two functions that are exported for public use.
14
15       On C-nodes, erl_interface has support for registry tables. These tables
16       reside in RAM on the C-node, but can also be dumped into Mnesia tables.
17       By default, the dumping of registry tables through erl_interface causes
18       a corresponding Mnesia table to be  created  with  mnesia_registry:cre‐
19       ate_table/1, if necessary.
20
21       Tables that are created with these functions can be administered as all
22       other Mnesia tables. They can be included in backups, replicas  can  be
23       added, and so on. The tables are normal Mnesia tables owned by the user
24       of the corresponding erl_interface registries.
25

EXPORTS

27       create_table(Tab) -> ok | exit(Reason)
28
29              A wrapper function for mnesia:create_table/2,  which  creates  a
30              table (if there is no existing table) with an appropriate set of
31              attributes. The table only resides on the  local  node  and  its
32              storage  type is the same as the schema table on the local node,
33              that is, {ram_copies,[node()]} or {disc_copies,[node()]}.
34
35              This function is used by erl_interface to create the Mnesia  ta‐
36              ble if it does not already exist.
37
38       create_table(Tab, TabDef) -> ok | exit(Reason)
39
40              A  wrapper  function  for mnesia:create_table/2, which creates a
41              table (if there is no existing table) with an appropriate set of
42              attributes.  The  attributes  and  TabDef  are forwarded to mne‐
43              sia:create_table/2. For example, if the table is  to  reside  as
44              disc_only_copies on all nodes, a call looks as follows:
45
46                        TabDef = [{{disc_only_copies, node()|nodes()]}],
47                        mnesia_registry:create_table(my_reg, TabDef)
48

SEE ALSO

50       erl_interface(3), mnesia(3)
51
52
53
54Ericsson AB                       mnesia 4.19               mnesia_registry(3)
Impressum