Copyright © 2015 Maas-Maarten Zeeman
Behaviours: gen_server.
Authors: Maas-Maarten Zeeman (mmzeeman@xs4all.nl).
code_change/3 | |
flush/1 | Flush the worker,. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
push/2 | Push a message to the named worker, when the worker is flushed the pushed messages are handled in-order. |
start_link/3 | Start the worker, the handler module will be called when new data entries are pushed in the buffer. |
stop/1 | Stop the worker, all pending work will be lost. |
terminate/2 |
code_change(OldVsn, State, Extra) -> any()
flush(Name::atom()) -> ok | {error, badarg}
Flush the worker,
handle_call(Request, From, State) -> any()
handle_cast(Msg, State) -> any()
handle_info(X1, State) -> any()
init(X1) -> any()
push(Name::atom(), Msg::term()) -> true
Push a message to the named worker, when the worker is flushed the pushed messages are handled in-order.
start_link(Name::atom(), Handler::module(), Args::term()) -> {ok, pid()} | {error, term()}
Start the worker, the handler module will be called when new data entries are pushed in the buffer.
The server calls Handler:init(pid(), Args) -> {ok, Timeout, HandlerState} when it is started. Timeout will be used as flush interval.stop(Name::atom()) -> ok
Stop the worker, all pending work will be lost.
terminate(Reason, State) -> any()
Generated by EDoc