Copyright © 2010 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
code_change/3 | Convert process state when code is changed. |
handle_call/3 | Fetch persistent data, first check the data dict that is still being written. |
handle_cast/2 | Put request, copy to the writer, keep a local copy of the data. |
handle_info/2 | Handling all non call/cast messages. |
init/1 | Initiates the server. |
pid_observe_tkvstore_delete/3 | Delete the persistent data of a type/key. |
pid_observe_tkvstore_get/3 | Fetch the persistent data of a type/key. |
pid_observe_tkvstore_put/3 | Do a put in the persistent store, replace existing key/value. |
start_link/0 | Starts the server. |
start_link/1 | |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
writer_loop/2 | Simple writer loop, started as a process. |
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
handle_call(Tkvstore_get::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Fetch persistent data, first check the data dict that is still being written
handle_cast(Tkvstore_put::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Put request, copy to the writer, keep a local copy of the data
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handling all non call/cast messages
init(Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
pid_observe_tkvstore_delete(Pid, Tkvstore_delete, Context) -> any()
Delete the persistent data of a type/key
pid_observe_tkvstore_get(Pid, Tkvstore_get, Context) -> any()
Fetch the persistent data of a type/key
pid_observe_tkvstore_put(Pid, Tkvstore_put, Context) -> any()
Do a put in the persistent store, replace existing key/value
start_link() -> {ok, Pid} | ignore | {error, Error}
Starts the server
start_link(Args) -> any()
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
writer_loop(KVStorePid, Context) -> any()
Simple writer loop, started as a process
Generated by EDoc