Erlang -- mnesia_registry

Mnesia

Reference Manual

Version 4.15.5

- User's Guide
- Reference Manual
- Release Notes
- PDF
- Top

- Expand All
- Contract All

### Table of Contents

- mnesia
  - Top of manual page
  - abort/1
  - activate_checkpoint/1
  - activity/2
  - activity/4
  - add_table_copy/3
  - add_table_index/2
  - all_keys/1
  - async_dirty/2
  - backup/1
  - backup_checkpoint/2
  - change_config/2
  - change_table_access_mode/2
  - change_table_copy_type/3
  - change_table_load_order/2
  - change_table_majority/2
  - clear_table/1
  - create_schema/1
  - create_table/2
  - deactivate_checkpoint/1
  - del_table_copy/2
  - del_table_index/2
  - delete/1
  - delete/3
  - delete_object/1
  - delete_object/3
  - delete_schema/1
  - delete_table/1
  - dirty_all_keys/1
  - dirty_delete/1
  - dirty_delete/2
  - dirty_delete_object/1
  - dirty_delete_object/2
  - dirty_first/1
  - dirty_index_match_object/2
  - dirty_index_match_object/3
  - dirty_index_read/3
  - dirty_last/1
  - dirty_match_object/1
  - dirty_match_object/2
  - dirty_next/2
  - dirty_prev/2
  - dirty_read/1
  - dirty_read/2
  - dirty_select/2
  - dirty_slot/2
  - dirty_update_counter/2
  - dirty_update_counter/3
  - dirty_write/1
  - dirty_write/2
  - dump_log/0
  - dump_tables/1
  - dump_to_textfile/1
  - error_description/1
  - ets/2
  - first/1
  - foldl/3
  - foldr/3
  - force_load_table/1
  - index_match_object/2
  - index_match_object/4
  - index_read/3
  - info/0
  - install_fallback/1
  - install_fallback/1
  - install_fallback/2
  - is_transaction/0
  - last/1
  - load_textfile/1
  - lock/2
  - match_object/1
  - match_object/3
  - move_table_copy/3
  - next/2
  - prev/2
  - read/1
  - read/2
  - read/3
  - read_lock_table/1
  - report_event/1
  - restore/2
  - s_delete/1
  - s_delete_object/1
  - s_write/1
  - schema/0
  - schema/1
  - select/2
  - select/4
  - select/1
  - set_debug_level/1
  - set_master_nodes/1
  - set_master_nodes/2
  - snmp_close_table/1
  - snmp_get_mnesia_key/2
  - snmp_get_next_index/2
  - snmp_get_row/2
  - snmp_open_table/2
  - start/0
  - stop/0
  - subscribe/1
  - sync_dirty/2
  - sync_log/0
  - sync_transaction/3
  - system_info/1
  - table/1
  - table_info/2
  - transaction/2
  - transform_table/4
  - transform_table/3
  - traverse_backup/4
  - uninstall_fallback/0
  - uninstall_fallback/1
  - unsubscribe/1
  - wait_for_tables/2
  - wread/1
  - write/1
  - write/3
  - write_lock_table/1
- mnesia_frag_hash
  - Top of manual page
  - add_frag/1
  - del_frag/1
  - init_state/2
  - key_to_frag_number/2
  - match_spec_to_frag_numbers/2
- mnesia_registry
  - Top of manual page
  - create_table/1
  - create_table/2

# mnesia_registry

### Module

mnesia_registry

### Module Summary

Dump support for registries in erl_interface.

### Description

This module is usually part of the erl_interface application, but is currently part of the Mnesia application.

This module is mainly intended for internal use within OTP, but it has two functions that are exported for public use.

On C-nodes, erl_interface has support for registry tables. These tables reside in RAM on the C-node, but can also be dumped into Mnesia tables. By default, the dumping of registry tables through erl_interface causes a corresponding Mnesia table to be created with mnesia_registry:create_table/1, if necessary.

Tables that are created with these functions can be administered as all other Mnesia tables. They can be included in backups, replicas can be added, and so on. The tables are normal Mnesia tables owned by the user of the corresponding erl_interface registries.

### Exports

create_table(Tab) -> ok | exit(Reason)

A wrapper function for mnesia:create_table/2, which creates a table (if there is no existing table) with an appropriate set of attributes. The table only resides on the local node and its storage type is the same as the schema table on the local node, that is, {ram_copies,[node()]} or {disc_copies,[node()]}.

This function is used by erl_interface to create the Mnesia table if it does not already exist.

create_table(Tab, TabDef) -> ok | exit(Reason)

A wrapper function for mnesia:create_table/2, which creates a table (if there is no existing table) with an appropriate set of attributes. The attributes and TabDef are forwarded to mnesia:create_table/2. For example, if the table is to reside as disc_only_copies on all nodes, a call looks as follows:

              TabDef = [{{disc_only_copies, node()|nodes()]}],
              mnesia_registry:create_table(my_reg, TabDef)

### See Also

erl_interface(3), mnesia(3)