ack_ref() = '?NOTHING_TO_ACK' | {segno(), ID::pos_integer()}
bytes() = non_neg_integer()
bytes_limit() = bytes() | {at_most | at_least, bytes()}
config() = #{dir => dir(), seg_bytes => bytes(), mem_only => boolean(), max_total_bytes => bytes(), offload => boolean() | {true, volatile}, sizer => sizer(), marshaller => marshaller()}
count() = non_neg_integer()
dir() = filename()
filename() = file:filename_all()
item() = term()
marshaller() = fun((item()) -> binary())
next_stop_before_state() = term()
abstract datatype: q()
segno() = pos_integer()
sizer() = fun((item()) -> bytes())
stop_before_func() = fun((item(), stop_before_initial_state()) -> true | next_stop_before_state())
stop_before_initial_state() = term()
w_cur() = #{segno := segno(), bytes := bytes(), count := count(), fd := '?NO_FD' | file:fd()}
| ack/2 | Asynch-ly write the consumed item Segment number + ID to a file. |
| append/2 | |
| bytes/1 | |
| close/1 | |
| committer_loop/2 | |
| count/1 | |
| default_marshaller/1 | |
| default_sizer/1 | |
| default_stop_before_func/2 | |
| do_read_items/2 | |
| is_empty/1 | |
| is_mem_only/1 | |
| open/1 | |
| overflow/1 | Returns number of bytes the size of the queue has exceeded total bytes limit. |
| peek/1 | peek the queue front item. |
| pop/2 | pop out at least one item from the queue. |
Asynch-ly write the consumed item Segment number + ID to a file.
committer_loop(ReaderSegno, Dir) -> any()
default_marshaller(I) -> any()
default_sizer(I) -> any()
default_stop_before_func(Item, State) -> any()
do_read_items(Dir, Segno) -> any()
is_empty(Q) -> any()
is_mem_only(X1::q()) -> boolean()
overflow(X1::q()) -> integer()
Returns number of bytes the size of the queue has exceeded total bytes limit. Result is negative when it is not overflow.
peek the queue front item.
pop(Q::q(), Opts::#{bytes_limit => bytes_limit(), count_limit => count(), stop_before => {stop_before_func(), stop_before_initial_state()}}) -> {q(), ack_ref(), [item()]}
pop out at least one item from the queue.
volume limited by bytes_limit and count_limit.
Generated by EDoc