leo_cluster_tbl_ring¶
The cluster ring table’s operation.
References
Description¶
The cluster ring table’s operation
Function Index¶
bulk_delete/2 | Remove bulk of records from the table. |
bulk_insert/2 | Insert bulk of records into the table. |
create_table_current/1 | create ring-current table. |
create_table_current/2 | |
create_table_for_test/3 | create table for the test. |
create_table_prev/1 | create ring-prev table. |
create_table_prev/2 | |
delete/2 | Remove a record from the table. |
delete_all/1 | Remove all objects from the table. |
first/1 | Retrieve a first record from the table. |
insert/2 | Insert a record into the table. |
last/1 | Retrieve a last record from the table. |
lookup/2 | Retrieve a record by key from the table. |
next/2 | Retrieve a next record from the table. |
overwrite/2 | Overwrite current records by source records. |
prev/2 | Retrieve a previous record from the table. |
size/1 | Retrieve total of records. |
tab2list/1 | Retrieve list from the table. |
Function Details¶
bulk_delete/2¶
bulk_delete(TableInfo, List) -> ok | {error, any()}
- TableInfo = table_info()
- List = [integer()]
Remove bulk of records from the table
bulk_insert/2¶
bulk_insert(TableInfo, List) -> ok | {error, any()}
- TableInfo = table_info()
- List = [{integer(), atom(), integer()}]
Insert bulk of records into the table
create_table_current/1¶
create_table_current(Mode) -> ok
- Mode = mnesia_copies()
create ring-current table
create_table_current/2¶
create_table_current(Mode, Nodes) -> ok
- Mode = mnesia_copies()
- Nodes = [atom()]
create_table_for_test/3¶
create_table_for_test(Mode, Nodes, Table) -> any()
create table for the test
delete/2¶
delete(TableInfo, VNodeId) -> ok | {error, any()}
- TableInfo = table_info()
- VNodeId = integer()
Remove a record from the table
delete_all/1¶
delete_all(TableInfo) -> ok
- TableInfo = table_info()
Remove all objects from the table
first/1¶
first(TableInfo) -> integer() | '$end_of_table'
- TableInfo = table_info()
Retrieve a first record from the table
insert/2¶
insert(TableInfo, Ring) -> ok | {error, any()}
- TableInfo = table_info()
- Ring = #ring{} | #ring_0_16_8{} | tuple()
Insert a record into the table
last/1¶
last(TableInfo) -> integer() | '$end_of_table'
- TableInfo = table_info()
Retrieve a last record from the table
lookup/2¶
lookup(TableInfo, VNodeId) -> #'?RING'{} | not_found | {error, any()}
- TableInfo = table_info()
- VNodeId = integer()
Retrieve a record by key from the table
next/2¶
Retrieve a next record from the table
overwrite/2¶
overwrite(TableInfo, TableInfo) -> ok | {error, any()}
- TableInfo = table_info()
Overwrite current records by source records
prev/2¶
prev(TableInfo, VNodeId) -> integer() | '$end_of_table'
- TableInfo = table_info()
- VNodeId = integer()
Retrieve a previous record from the table
tab2list/1¶
tab2list(TableInfo) -> [tuple()] | [#'?RING'{}] | {error, any()}
- TableInfo = table_info()
Retrieve list from the table