Behaviours: gen_server.
This module defines the supervisor2 behaviour.
Required callback functions: init/1.
call() = which_children | count_children | {term(), term()}
XXX: refine
child() = undefined | pid()
child_id() = term()
child_rec() = #child{pid = child() | {restarting, pid()} | [pid()], name = child_id(), mfargs = mfargs(), restart_type = restart(), shutdown = shutdown(), child_type = worker(), modules = modules()}
child_spec() = {Id::child_id(), StartFunc::mfargs(), Restart::restart(), Shutdown::shutdown(), Type::worker(), Modules::modules()}
delay() = non_neg_integer()
init_sup_name() = sup_name() | self
mfargs() = {M::module(), F::atom(), A::[term()] | undefined}
modules() = [module()] | dynamic
restart() = permanent | transient | temporary | intrinsic | {permanent, delay()} | {transient, delay()} | {intrinsic, delay()}
shutdown() = brutal_kill | timeout()
startchild_err() = already_present | {already_started, Child::child()} | term()
startchild_ret() = {ok, Child::child()} | {ok, Child::child(), Info::term()} | {error, startchild_err()}
startlink_err() = {already_started, pid()} | {shutdown, term()} | term()
startlink_ret() = {ok, pid()} | ignore | {error, startlink_err()}
state() = #state{name = any(), strategy = strategy(), children = [child_rec()], dynamics = dict:dict() | set:set() | undefined, intensity = non_neg_integer(), period = pos_integer(), restarts = any(), dynamic_restarts = non_neg_integer(), module = any(), args = any()}
stop_rsn() = {shutdown, term()} | {bad_return, {module(), init, term()}} | {bad_start_spec, term()} | {start_spec, term()} | {supervisor_data, term()}
strategy() = one_for_all | one_for_one | rest_for_one | simple_one_for_one
sup_name() = {local, Name::atom()} | {global, Name::atom()}
sup_ref() = (Name::atom()) | {Name::atom(), Node::node()} | {global, Name::atom()} | pid()
worker() = worker | supervisor
check_childspecs(ChildSpecs) -> Result
ChildSpecs = [child_spec()]Result = ok | {error, Error::term()}
count_children(SupRef) -> PropListOfCounts
SupRef = sup_ref()PropListOfCounts = [Count]Count = {specs, ChildSpecCount::non_neg_integer()} | {active, ActiveProcessCount::non_neg_integer()} | {supervisors, ChildSupervisorCount::non_neg_integer()} | {workers, ChildWorkerCount::non_neg_integer()}
delete_child(SupRef, Id) -> Result
SupRef = sup_ref()Id = child_id()Result = ok | {error, Error}Error = running | restarting | not_found | simple_one_for_one
handle_cast(X1::{try_again_restart, child_id() | pid(), term()}, State::state()) -> {noreply, state()} | {stop, shutdown, state()}
init(X1::{init_sup_name(), module(), [term()]}) -> {ok, state()} | ignore | {stop, stop_rsn()}
restart_child(SupRef, Id) -> Result
SupRef = sup_ref()Id = child_id()Result = {ok, Child::child()} | {ok, Child::child(), Info::term()} | {error, Error}Error = running | restarting | not_found | simple_one_for_one | term()
start_child(SupRef, ChildSpec) -> startchild_ret()
SupRef = sup_ref()ChildSpec = child_spec() | (List::[term()])
start_link(SupName, Module, Args) -> startlink_ret()
SupName = sup_name()Module = module()Args = term()
terminate(Reason::term(), State::state()) -> ok
terminate_child(SupRef, Id) -> Result
SupRef = sup_ref()Id = pid() | child_id()Result = ok | {error, Error}Error = not_found | simple_one_for_one
try_again_restart(SupRef, Child, Reason) -> ok
SupRef = sup_ref()Child = child_id() | pid()Reason = term()
which_children(SupRef) -> [{Id, Child, Type, Modules}]
SupRef = sup_ref()Id = child_id() | undefinedChild = child() | restartingType = worker()Modules = modules()
Generated by EDoc