Module ra_log_reader

Data Types

access_pattern()

access_pattern() = sequential | random

holds static or rarely changing fields

read_plan()

read_plan() = [{BaseName::file:filename_all(), [ra:index()]}]

read_plan_options()

read_plan_options() = #{access_pattern => random | sequential, file_advise => ra_log_segment:posix_file_advise()}

segment_ref()

segment_ref() = ra_log:segment_ref()

state()

abstract datatype: state()

Function Index

close/1
exec_read_plan/6
fetch_term/2
fold/5
handle_log_update/2
init/5
init/7
num_open_segments/1
range/1
read_plan/2
segment_ref_count/1
segment_refs/1
sparse_read/3
update_first_index/2
update_segments/2

Function Details

close/1

close(X1::state()) -> ok

exec_read_plan/6

exec_read_plan(Dir::file:filename_all(), Plan::read_plan(), Open0::undefined | ra_flru:state(), TransformFun::fun((ra_index(), ra_term(), binary()) -> term()), Options::read_plan_options(), Acc0::#{ra_index() => Command::term()}) -> {#{ra_index() => Command::term()}, ra_flru:state()}

fetch_term/2

fetch_term(Idx::ra_index(), State0::state()) -> {option(ra_index()), state()}

fold/5

fold(FromIdx::ra_index(), ToIdx::ra_index(), Fun::function(), Acc::term(), State0::state()) -> {state(), term()}

handle_log_update/2

handle_log_update(X1::{ra_log_update, undefined | pid(), ra_index(), [segment_ref()]}, State::state()) -> state()

init/5

init(UId::ra_uid(), Dir::file:filename(), MaxOpen::non_neg_integer(), SegRefs::[segment_ref()], Names::ra_system:names()) -> state()

init/7

init(UId::ra_uid(), Dir::file:filename(), MaxOpen::non_neg_integer(), AccessPattern::access_pattern(), SegRefs0::[segment_ref()], X6::ra_system:names(), Counter::undefined | counters:counters_ref()) -> state()

num_open_segments/1

num_open_segments(X1::state()) -> non_neg_integer()

range/1

range(X1::state()) -> ra_range:range()

read_plan/2

read_plan(X1::state(), Indexes::[ra_index()]) -> read_plan()

segment_ref_count/1

segment_ref_count(X1::state()) -> non_neg_integer()

segment_refs/1

segment_refs(X1::state()) -> [segment_ref()]

sparse_read/3

sparse_read(State::state(), Indexes::[ra_index()], Entries0::[log_entry()]) -> {[log_entry()], state()}

update_first_index/2

update_first_index(FstIdx::ra_index(), State::state()) -> {state(), [segment_ref()]}

update_segments/2

update_segments(NewSegmentRefs::[segment_ref()], State::state()) -> state()


Generated by EDoc