123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>Module pooler</title>
- <link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
- </head>
- <body bgcolor="white">
- <div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
- <hr>
- <h1>Module pooler</h1>
- <ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>This is the main interface to the pooler application.
- <p>Copyright © 2011 Seth Falcon</p>
- <p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
- <p><b>Authors:</b> Seth Falcon (<a href="mailto:seth@userprimary.net"><tt>seth@userprimary.net</tt></a>).</p>
- <h2><a name="description">Description</a></h2><p>This is the main interface to the pooler application</p>
-
- 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).
-
- <h2><a name="index">Function Index</a></h2>
- <table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr>
- <tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td></td></tr>
- <tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td></td></tr>
- <tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td></td></tr>
- <tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr>
- <tr><td valign="top"><a href="#pool_stats-0">pool_stats/0</a></td><td>Obtain runtime state info for all pools.</td></tr>
- <tr><td valign="top"><a href="#return_member-2">return_member/2</a></td><td>Return a member to the pool so it can be reused.</td></tr>
- <tr><td valign="top"><a href="#start-1">start/1</a></td><td></td></tr>
- <tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td></td></tr>
- <tr><td valign="top"><a href="#stop-0">stop/0</a></td><td></td></tr>
- <tr><td valign="top"><a href="#take_member-0">take_member/0</a></td><td>Obtain exclusive access to a member from a randomly selected pool.</td></tr>
- <tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td></td></tr>
- </table>
- <h2><a name="functions">Function Details</a></h2>
- <h3 class="function"><a name="code_change-3">code_change/3</a></h3>
- <div class="spec">
- <p><tt>code_change(OldVsn, State, Extra) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
- <div class="spec">
- <p><tt>handle_call(Request, From, State) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
- <div class="spec">
- <p><tt>handle_cast(Msg, State) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
- <div class="spec">
- <p><tt>handle_info(Info, State) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="init-1">init/1</a></h3>
- <div class="spec">
- <p><tt>init(Config) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="pool_stats-0">pool_stats/0</a></h3>
- <div class="spec">
- <p><tt>pool_stats() -> any()</tt></p>
- </div><p><p>Obtain runtime state info for all pools.</p>
-
- Format of the return value is subject to change.</p>
- <h3 class="function"><a name="return_member-2">return_member/2</a></h3>
- <div class="spec">
- <p><tt>return_member(Pid, Status) -> any()</tt></p>
- </div><p><p>Return a member to the pool so it can be reused.</p>
-
- If <code>Status</code> is 'ok', the member is returned to the pool. If
- <code>Status</code> is 'fail', the member is destroyed and a new member is
- added to the pool in its place.</p>
- <h3 class="function"><a name="start-1">start/1</a></h3>
- <div class="spec">
- <p><tt>start(Config) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="start_link-1">start_link/1</a></h3>
- <div class="spec">
- <p><tt>start_link(Config) -> any()</tt></p>
- </div>
- <h3 class="function"><a name="stop-0">stop/0</a></h3>
- <div class="spec">
- <p><tt>stop() -> any()</tt></p>
- </div>
- <h3 class="function"><a name="take_member-0">take_member/0</a></h3>
- <div class="spec">
- <p><tt>take_member() -> any()</tt></p>
- </div><p><p>Obtain exclusive access to a member from a randomly selected pool.</p>
-
- 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.
- </p>
- <h3 class="function"><a name="terminate-2">terminate/2</a></h3>
- <div class="spec">
- <p><tt>terminate(Reason, State) -> any()</tt></p>
- </div>
- <hr>
- <div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
- <p><i>Generated by EDoc, Apr 17 2011, 16:02:59.</i></p>
- </body>
- </html>
|