Module ra_snapshot

Data Types

checkpoint()

checkpoint() = ra_idxterm()

effect()

effect() = {monitor, process, snapshot_writer, pid()}

file_err()

file_err() = ra_lib:file_err()

kind()

kind() = snapshot | checkpoint

meta()

meta() = snapshot_meta()

state()

abstract datatype: state()

Function Index

abort_accept/1
accept_chunk/4
accepting/1
begin_accept/2
begin_read/2
begin_snapshot/4
complete_snapshot/3
context/2
current/1
current_snapshot_dir/1
delete/2
directory/2
handle_down/3
init/6
init_ets/0
last_index_for/1
latest_checkpoint/1
pending/1
promote_checkpoint/2
read_chunk/3
read_meta/2
recover/1
take_extra_checkpoints/1
take_older_checkpoints/2

Function Details

abort_accept/1

abort_accept(State::state()) -> state()

accept_chunk/4

accept_chunk(Chunk::term(), Num::non_neg_integer(), ChunkFlag::chunk_flag(), State::state()) -> {ok, state()}

accepting/1

accepting(X1::state()) -> option(ra_idxterm())

begin_accept/2

begin_accept(Meta::meta(), State::state()) -> {ok, state()}

begin_read/2

begin_read(State::state(), Context::map()) -> {ok, Meta::meta(), ReadState} | {error, term()}

begin_snapshot/4

begin_snapshot(Meta::meta(), ReleaseCursorRef::term(), SnapKind::kind(), State::state()) -> {state(), [effect()]}

complete_snapshot/3

complete_snapshot(IdxTerm::ra_idxterm(), X2::kind(), State::state()) -> state()

context/2

context(X1::state(), Node::node()) -> map()

current/1

current(X1::state()) -> option(ra_idxterm())

current_snapshot_dir/1

current_snapshot_dir(X1::state()) -> option(file:filename())

delete/2

delete(Dir, X2) -> any()

directory/2

directory(X1::state(), X2::kind()) -> file:filename()

handle_down/3

handle_down(Pid::pid(), Info::term(), State::state()) -> state()

init/6

init(UId::ra_uid(), Module::module(), SnapshotsDir::file:filename(), CheckpointDir::file:filename(), Counter::undefined | counters:counters_ref(), MaxCheckpoints::pos_integer()) -> state()

init_ets/0

init_ets() -> ok

last_index_for/1

last_index_for(UId::ra_uid()) -> option(ra_index())

latest_checkpoint/1

latest_checkpoint(X1::state()) -> option(checkpoint())

pending/1

pending(X1::state()) -> option({pid(), ra_idxterm(), kind()})

promote_checkpoint/2

promote_checkpoint(Idx::ra_index(), State0::state()) -> {boolean(), State::state(), Effects::[effect()]}

read_chunk/3

read_chunk(ReadState, ChunkSizeBytes::non_neg_integer(), State::state()) -> {ok, Data::term(), {next, ReadState} | last} | {error, term()}

read_meta/2

read_meta(Module::module(), Location::file:filename()) -> {ok, meta()} | {error, invalid_format | {invalid_version, integer()} | checksum_error | file_err() | term()}

recover/1

recover(X1::state()) -> {ok, Meta::meta(), State::term()} | {error, no_current_snapshot} | {error, term()}

take_extra_checkpoints/1

take_extra_checkpoints(State0::state()) -> {state(), [checkpoint()]}

take_older_checkpoints/2

take_older_checkpoints(Idx::ra_index(), State0::state()) -> {state(), [checkpoint()]}


Generated by EDoc