Copyright © 2010 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
add_child/2 | Add a child, the child will be added and started. |
check_children/1 | Check children, try restarting children when they are in 'error' state. |
code_change/3 | Convert process state when code is changed. |
delete_child/2 | Delete a child, the child will be terminated and removed. |
handle_call/3 | Add a child in the stopped state. |
handle_cast/2 | Stop a child process and add it to the stopped list. |
handle_info/2 | Handle the exit of a child. |
init/1 | Initiates the server. |
restart_child/2 | Terminate and restart a child. |
running_children/1 | Return the list of running children. |
set_manager_pid/2 | Set the manager pid for this supervisor. |
start_child/2 | Start a child when it is not running (either failed or stopped). |
start_link/1 | |
start_link/2 | |
stop_child/2 | Stop a child, the child will be terminated and put in "stopped" state. |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
which_children/1 | Return the list of all children and their run state. |
add_child(Pid, ChildSpec) -> any()
Add a child, the child will be added and started.
check_children(Pid) -> any()
Check children, try restarting children when they are in 'error' state.
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
delete_child(Pid, Name) -> any()
Delete a child, the child will be terminated and removed.
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Add a child in the stopped state.
handle_cast(Message, State) -> any()
Stop a child process and add it to the stopped list.
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handle the exit of a child
init(InitialChildren::Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
restart_child(Pid, Name) -> any()
Terminate and restart a child.
running_children(Pid) -> any()
Return the list of running children
set_manager_pid(Pid, ManagerPid) -> any()
Set the manager pid for this supervisor
start_child(Pid, Name) -> any()
Start a child when it is not running (either failed or stopped)
start_link(Args) -> any()
start_link(SupName, Args) -> any()
stop_child(Pid, Name) -> any()
Stop a child, the child will be terminated and put in "stopped" state
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.
which_children(Pid) -> any()
Return the list of all children and their run state.
Generated by EDoc, Feb 25 2011, 21:14:41.