Behaviours: gen_server.
References
| checkin/2 | Check in a worker to the woker pool. |
| checkin_async/2 | Check in a worker to the worker pool with asynchronous. |
| checkout/1 | Check out a worker from the worker pool. |
| close/1 | Retrieve pids of specified PodName. |
| code_change/3 | gen_server callback - Module:code_change(OldVsn, State, Extra) -> {ok, NewState} | {error, Reason}. |
| handle_call/3 | gen_server callback - Module:handle_call(Request, From, State) -> Result. |
| handle_cast/2 | gen_server callback - Module:handle_cast(Request, State) -> Result. |
| handle_info/2 | gen_server callback - Module:handle_info(Info, State) -> Result. |
| init/1 | gen_server callback - Module:init(Args) -> Result. |
| pool_pids/1 | Retrieve pids of specified PodName. |
| raw_status/1 | Retrieve a raw status of specified PodName. |
| start_link/6 | Initialize a wooker pool. |
| status/1 | Retrieve the current status in pretty format as follows: format: { working_process_count, worker_process_count, overflow_count }. |
| stop/1 | Stop the worker pool. |
| terminate/2 | gen_server callback - Module:terminate(Reason, State). |
checkin(PodName, WorkerPid) -> ok | {error, any()}
PodName = atom()WorkerPid = pid()
Check in a worker to the woker pool
checkin_async(PodName, WorkerPid) -> ok
PodName = atom()WorkerPid = pid()
Check in a worker to the worker pool with asynchronous
checkout(PodName) -> {ok, pid()} | {error, empty}
PodName = atom()
Check out a worker from the worker pool
close(PodName) -> ok | {error, any()}
PodName = atom()
Retrieve pids of specified PodName
code_change(OldVsn, State, Extra) -> any()
gen_server callback - Module:code_change(OldVsn, State, Extra) -> {ok, NewState} | {error, Reason}
Description: Convert process state when code is changed
handle_call(X1, From, State) -> any()
gen_server callback - Module:handle_call(Request, From, State) -> Result
handle_cast(X1, State) -> any()
gen_server callback - Module:handle_cast(Request, State) -> Result
handle_info(Info, State) -> any()
gen_server callback - Module:handle_info(Info, State) -> Result
init(X1) -> any()
gen_server callback - Module:init(Args) -> Result
pool_pids(PodName) -> {ok, [pid()]} | {error, any()}
PodName = atom()
Retrieve pids of specified PodName
raw_status(PodName) -> {ok, [tuple()]} | {error, any()}
PodName = atom()
Retrieve a raw status of specified PodName
start_link(PodName, NumOfChildren, MaxOverflow, WorkerMod, WorkerArgs, InitFun) -> {ok, pid()} | ignore | {error, any()}
PodName = atom()NumOfChildren = pos_integer()MaxOverflow = non_neg_integer()WorkerMod = module()WorkerArgs = [any()]InitFun = function()
Initialize a wooker pool
status(PodName) -> {ok, {NumOfWorking, NumOfWating, NumOfRoomForOverflow}}
PodName = atom()NumOfWorking = non_neg_integer()NumOfWating = non_neg_integer()NumOfRoomForOverflow = non_neg_integer()
Retrieve the current status in pretty format as follows: format: { working_process_count, worker_process_count, overflow_count }
stop(PodName) -> ok | {error, any()}
PodName = atom()
Stop the worker pool
terminate(Reason, State) -> any()
gen_server callback - Module:terminate(Reason, State)
Description: 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.
Generated by EDoc