Copyright © 2012-2013 Seth Falcon
Behaviours: gen_server.
Authors: Seth Falcon (seth@userprimary.net).
parent() = pid() | pool
pool_member_sup() = pid() | atom()
start_result() = {StarterPid::pid(), Result::pid() | {error, term()}}
abstract datatype: start_spec()
code_change/3 | |
handle_call/3 | |
handle_cast/2 | |
handle_continue/2 | |
handle_info/2 | |
init/1 | |
start_link/1 | |
start_member/2 | Start a member for the specified Pool . |
start_member/3 | Same as start_member/1 except that instead of calling
pooler:accept_member/2 a raw message is sent to Parent of
the form {accept_member, {Ref, Member} . |
stop/1 | |
stop_member_async/1 | Stop a member in the pool. |
terminate/2 |
code_change(OldVsn::term(), State::term(), Extra::term()) -> {ok, term()}
handle_call(Request, From, State) -> any()
handle_cast(Request, Starter) -> any()
handle_continue(X1, Starter) -> any()
handle_info(Info, State) -> any()
init(X1::start_spec()) -> {ok, #starter{parent = parent(), pool_name = pooler:pool_name(), pool_member_sup = pool_member_sup(), msg = start_result() | undefined}, {continue, start}}
start_link(Spec::start_spec()) -> {ok, pid()}
start_member(PoolName::pooler:pool_name(), PoolMemberSup::pool_member_sup()) -> pid()
Start a member for the specified Pool
.
Member creation with this call is async. This function returns
immediately with create process' pid. When the member has been
created it is sent to the specified pool via
pooler:accept_member/2
.
pooler_starter
instance via
pooler_starter_sup
. The instance terminates normally after
creating a single member.
start_member(PoolName::pooler:pool_name(), PoolMemberSup::pool_member_sup(), Parent::pid()) -> pid()
Same as start_member/1
except that instead of calling
pooler:accept_member/2
a raw message is sent to Parent
of
the form {accept_member, {Ref, Member}
. Where Member
will
either be the member pid or an error term and Ref
will be the
Pid of the starter.
pooler
to start the
initial set of pool members in parallel.
stop(Starter) -> any()
stop_member_async(Pid::pid()) -> ok
Stop a member in the pool
terminate(Reason::term(), State::term()) -> ok
Generated by EDoc