View Source partisan_gen_fsm behaviour (partisan v5.0.0-beta.21)

@deprecated

Link to this section Summary

Link to this section Callbacks

Link to this callback

code_change/4

View Source (optional)
-callback code_change(OldVsn :: term() | {down, term()},
            StateName :: atom(),
            StateData :: term(),
            Extra :: term()) ->
               {ok, NextStateName :: atom(), NewStateData :: term()}.
Link to this callback

format_status/2

View Source (optional)
-callback format_status(Opt, StatusData) -> Status
                 when
                     Opt :: normal | terminate,
                     StatusData :: [PDict | State],
                     PDict :: [{Key :: term(), Value :: term()}],
                     State :: term(),
                     Status :: term().
-callback handle_event(Event :: term(), StateName :: atom(), StateData :: term()) ->
                {next_state, NextStateName :: atom(), NewStateData :: term()} |
                {next_state,
                 NextStateName :: atom(),
                 NewStateData :: term(),
                 timeout() | hibernate} |
                {stop, Reason :: term(), NewStateData :: term()}.
Link to this callback

handle_info/3

View Source (optional)
-callback handle_info(Info :: term(), StateName :: atom(), StateData :: term()) ->
               {next_state, NextStateName :: atom(), NewStateData :: term()} |
               {next_state,
                NextStateName :: atom(),
                NewStateData :: term(),
                timeout() | hibernate} |
               {stop, Reason :: normal | term(), NewStateData :: term()}.
-callback handle_sync_event(Event :: term(),
                  From :: {pid(), Tag :: term()},
                  StateName :: atom(),
                  StateData :: term()) ->
                     {reply, Reply :: term(), NextStateName :: atom(), NewStateData :: term()} |
                     {reply,
                      Reply :: term(),
                      NextStateName :: atom(),
                      NewStateData :: term(),
                      timeout() | hibernate} |
                     {next_state, NextStateName :: atom(), NewStateData :: term()} |
                     {next_state,
                      NextStateName :: atom(),
                      NewStateData :: term(),
                      timeout() | hibernate} |
                     {stop, Reason :: term(), Reply :: term(), NewStateData :: term()} |
                     {stop, Reason :: term(), NewStateData :: term()}.
-callback init(Args :: term()) ->
        {ok, StateName :: atom(), StateData :: term()} |
        {ok, StateName :: atom(), StateData :: term(), timeout() | hibernate} |
        {stop, Reason :: term()} |
        ignore.
-callback terminate(Reason :: normal | shutdown | {shutdown, term()} | term(),
          StateName :: atom(),
          StateData :: term()) ->
             term().

Link to this section Functions

Link to this function

enter_loop(Mod, Options, StateName, StateData)

View Source
Link to this function

enter_loop(Mod, Options, StateName, StateData, ServerName)

View Source
Link to this function

enter_loop(Mod, Options, StateName, StateData, ServerName, Timeout)

View Source
Link to this function

format_status(Opt, StatusData)

View Source
Link to this function

init_it(Starter, Parent, Name, Mod, Args, Options)

View Source
Link to this function

send_all_state_event(Name, Event)

View Source
Link to this function

send_event_after(Time, Event)

View Source
Link to this function

start(Mod, Args, Options)

View Source
Link to this function

start(Name, Mod, Args, Options)

View Source
Link to this function

start_link(Mod, Args, Options)

View Source
Link to this function

start_link(Name, Mod, Args, Options)

View Source
Link to this function

stop(Name, Reason, Timeout)

View Source
Link to this function

sync_send_all_state_event(Name, Event)

View Source
Link to this function

sync_send_all_state_event(Name, Event, Timeout)

View Source
Link to this function

sync_send_event(Name, Event)

View Source
Link to this function

sync_send_event(Name, Event, Timeout)

View Source
Link to this function

system_code_change(_, Module, OldVsn, Extra)

View Source
Link to this function

system_continue(Parent, Debug, _)

View Source
Link to this function

system_replace_state(StateFun, _)

View Source
Link to this function

system_terminate(Reason, Parent, Debug, _)

View Source
-spec system_terminate(term(), _, _, [term(), ...]) -> no_return().
Link to this function

wake_hib(Parent, Name, StateName, StateData, Mod, HibernateAfterTimeout, Debug)

View Source