Behaviours: gen_server, mnesia_backend_type.
rocksdb storage backend for Mnesia.
This module implements a mnesia backend callback plugin. It's specifically documented to try to explain the workings of backend plugins.alias() = atom()
data_tab() = atom()
error() = {error, any()}
index_info() = {index_pos(), index_type()}
index_pos() = integer() | {atom()}
index_tab() = {data_tab(), index, index_info()}
index_type() = ordered
retainer_name() = any()
retainer_tab() = {data_tab(), retainer, retainer_name()}
table() = data_tab() | index_tab() | retainer_tab()
table_type() = set | ordered_set | bag
add_aliases(Aliases) -> any()
check_definition(Alias, Tab, Nodes, Props) -> any()
close_table(Alias, Tab) -> any()
code_change(FromVsn, St, Extra) -> any()
create_schema(Nodes) -> any()
create_schema(Nodes, Aliases) -> any()
create_table(Alias, Tab, Props) -> any()
decode_key(Key) -> any()
decode_key(Key, Metadata) -> any()
decode_val(Val) -> any()
decode_val(Val, Key, Metadata) -> any()
default_alias() -> any()
delete(Alias, Tab, Key) -> any()
delete_table(Alias, Tab) -> any()
encode_key(Key) -> any()
encode_key(Key, Metadata) -> any()
encode_val(Val) -> any()
encode_val(Val, Metadata) -> any()
first(Alias, Tab) -> any()
fixtable(Alias, Tab, Bool) -> any()
handle_call(M, From, St) -> any()
handle_cast(X1, St) -> any()
handle_info(EXIT, St) -> any()
index_is_consistent(Alias, X2, Bool) -> any()
info(Alias, Tab, Item) -> any()
init(X1) -> any()
init_backend() -> any()
Called by mnesia_schema in order to intialize the backend
This is called when the backend is registered with the first alias, or ...
See OTP issue #425 (16 Feb 2021). This callback is supposed to be called before first use of the backend, but unfortunately, it is only called at mnesia startup and when a backend module is registered MORE THAN ONCE. This means we need to handle this function being called multiple times.
The bug has been fixed as of OTP 24.0-rc3
If processes need to be started, this can be done using
mnesia_ext_sup:start_proc(Name, Mod, F, Args [, Opts])
where Opts are parameters for the supervised child:
restart
(default: transient
)
* shutdown
(default: 120000
)
* type
(default: worker
)
* modules
(default: [Mod]
)
insert(Alias, Tab, Obj) -> any()
is_index_consistent(Alias, X2) -> any()
ix_listvals(Tab, Pos, Obj) -> any()
ix_prefixes(Tab, Pos, Obj) -> any()
last(Alias, Tab) -> any()
load_table(Alias, Tab, LoadReason, Props) -> any()
lookup(Alias, Tab, Key) -> any()
match_delete(Alias, Tab, Pat) -> any()
next(Alias, Tab, Key) -> any()
prev(Alias, Tab, Key) -> any()
real_suffixes() -> any()
receive_data(Data, Alias, Tab, Sender, State) -> any()
receive_done(Alias, Tab, Sender, State) -> any()
receiver_first_message(Pid, Msg, Alias, Tab) -> any()
register() -> {ok, alias()} | {error, term()}
Equivalent to register(rocksdb_copies).
Convenience function for registering a mnesia_rocksdb backend plugin
The function used to register a plugin ismnesia_schema:add_backend_type(Alias, Module)
where Module
implements a backend_type behavior. Alias
is an atom, and is used
in the same way as ram_copies
etc. The default alias is rocksdb_copies
.
remove_aliases(Aliases) -> any()
repair_continuation(Cont, Ms) -> any()
select(Cont) -> any()
select(Alias, Tab, Ms) -> any()
select(Alias, IxTab, Ms, Limit) -> any()
semantics(Alias, X2) -> any()
sender_handle_info(Msg, Alias, Tab, ReceiverPid, Cont) -> any()
sender_init(Alias, Tab, RemoteStorage, Pid) -> any()
show_table(Tab) -> any()
A debug function that shows the rocksdb table content
show_table(Tab, Limit) -> any()
slot(Alias, Tab, Pos) -> any()
start_proc(Alias, Tab, Type, ProcName, Props, RdbOpts) -> any()
sync_close_table(Alias, Tab) -> any()
terminate(Reason, St) -> any()
tmp_suffixes() -> any()
update_counter(Alias, Tab, C, Val) -> any()
validate_key(Alias, Tab, RecName, Arity, Type, Key) -> any()
validate_record(Alias, Tab, RecName, Arity, Type, Obj) -> any()
Generated by EDoc