View Source nova_session_ets (nova v0.9.11)
Link to this section Summary
Functions
Convert process state when code is changed
This function is called for changing the form and appearance of gen_server status when it is returned from sys:get_status/1,2 or when it appears in termination error logs.
Handling call messages
Handling cast messages
Handling all non call/cast messages
Initializes the server
Starts the server
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.
Link to this section Functions
-spec code_change(OldVsn :: term() | {down, term()}, State :: term(), Extra :: term()) ->
{ok, NewState :: term()} | {error, Reason :: term()}.
-spec delete_value(SessionId :: binary()) -> ok | {error, Reason :: term()}.
-spec delete_value(SessionId :: binary(), Key :: binary()) -> ok | {error, Reason :: term()}.
-spec format_status(Opt :: normal | terminate, Status :: list()) -> Status :: term().
-spec get_value(SessionId :: binary(), Key :: binary()) -> {ok, Value :: binary()} | {error, not_found}.
-spec handle_call(Request :: term(), From :: {pid(), term()}, State :: term()) ->
{reply, Reply :: term(), NewState :: term()} |
{reply, Reply :: term(), NewState :: term(), Timeout :: timeout()} |
{reply, Reply :: term(), NewState :: term(), hibernate} |
{noreply, NewState :: term()} |
{noreply, NewState :: term(), Timeout :: timeout()} |
{noreply, NewState :: term(), hibernate} |
{stop, Reason :: term(), Reply :: term(), NewState :: term()} |
{stop, Reason :: term(), NewState :: term()}.
-spec handle_cast(Request :: term(), State :: term()) ->
{noreply, NewState :: term()} |
{noreply, NewState :: term(), Timeout :: timeout()} |
{noreply, NewState :: term(), hibernate} |
{stop, Reason :: term(), NewState :: term()}.
-spec handle_info(Info :: timeout() | term(), State :: term()) ->
{noreply, NewState :: term()} |
{noreply, NewState :: term(), Timeout :: timeout()} |
{noreply, NewState :: term(), hibernate} |
{stop, Reason :: normal | term(), NewState :: term()}.
-spec init(Args :: term()) ->
{ok, State :: term()} |
{ok, State :: term(), Timeout :: timeout()} |
{ok, State :: term(), hibernate} |
{stop, Reason :: term()} |
ignore.
-spec set_value(SessionId :: binary(), Key :: binary(), Value :: binary()) ->
ok | {error, Reason :: term()}.
-spec start_link() ->
{ok, Pid :: pid()} |
{error, Error :: {already_started, pid()}} |
{error, Error :: term()} |
ignore.
-spec terminate(Reason :: normal | shutdown | {shutdown, term()} | term(), State :: term()) -> any().