Module pooler

This is the main interface to the pooler application.

Copyright © 2011 Seth Falcon

Behaviours: gen_server.

Authors: Seth Falcon (seth@userprimary.net).

Description

This is the main interface to the pooler application

To integrate with your application, you probably want to call application:start(pooler) after having specified appropriate configuration for the pooler application (either via a config file or appropriate calls to the application module to set the application's config).

Function Index

code_change/3
handle_call/3
handle_cast/2
handle_info/2
init/1
pool_stats/0Obtain runtime state info for all pools.
return_member/2Return a member to the pool so it can be reused.
start/1
start_link/1
stop/0
take_member/0Obtain exclusive access to a member from a randomly selected pool.
terminate/2

Function Details

code_change/3

code_change(OldVsn, State, Extra) -> any()

handle_call/3

handle_call(Request, From, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(Info, State) -> any()

init/1

init(Config) -> any()

pool_stats/0

pool_stats() -> any()

Obtain runtime state info for all pools.

Format of the return value is subject to change.

return_member/2

return_member(Pid, Status) -> any()

Return a member to the pool so it can be reused.

If Status is 'ok', the member is returned to the pool. If Status is 'fail', the member is destroyed and a new member is added to the pool in its place.

start/1

start(Config) -> any()

start_link/1

start_link(Config) -> any()

stop/0

stop() -> any()

take_member/0

take_member() -> any()

Obtain exclusive access to a member from a randomly selected pool.

If there are no free members in the randomly selected pool, then a member will be returned from the pool with the most free members. If no free members are available, 'error_no_members' is returned.

terminate/2

terminate(Reason, State) -> any()


Generated by EDoc, Apr 17 2011, 16:02:59.