Module mero_pool

This module defines the mero_pool behaviour.
Required callback functions: transaction/3, close/2, connect/3, controlling_process/2.

Data Types

client()

client() = term()

conn()

conn() = #conn{updated = erlang:timestamp(), pool = module(), worker_module = module(), client = client()}

Function Index

checkin/1Return a connection to specfied pool updating its timestamp.
checkin_closed/1Return a connection that has been closed.
checkout/2Checks out an element of the pool.
close/2
init/6
pool_loop/3
start_link/5
state/1Returns the specified PoolName state.
system_continue/3
system_terminate/4
transaction/3Executes an operation.

Function Details

checkin/1

checkin(Connection::conn()) -> ok

Return a connection to specfied pool updating its timestamp

checkin_closed/1

checkin_closed(Connection::conn()) -> ok

Return a connection that has been closed.

checkout/2

checkout(PoolName::atom(), TimeLimit::tuple()) -> {ok, conn()} | {error, Reason::term()}

Checks out an element of the pool.

close/2

close(Conn, Reason) -> any()

init/6

init(Parent, ClusterName, Host, Port, PoolName, WrkModule) -> any()

pool_loop/3

pool_loop(State, Parent, Deb) -> any()

start_link/5

start_link(ClusterName, Host, Port, PoolName, WorkerModule) -> any()

state/1

state(PoolName::atom()) -> term()

Returns the specified PoolName state.

system_continue/3

system_continue(Parent, Deb, State) -> any()

system_terminate/4

system_terminate(Reason::term(), Parent::term(), Deb::term(), State::term()) -> no_return()

transaction/3

transaction(Connection::conn(), Function::atom(), Args::list()) -> {NewConnection::conn(), {ok, any()}} | {error, any()}

Executes an operation


Generated by EDoc