Class moose.adapters.client.ConnectionPool
Extends
comb.collections.Pool.
Base class for all connection pools
Defined in: ConnectionPool.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
closeConnection(conn)
Override to implement close connection functionality;
|
|
Override to create connections to insert into this ConnectionPool.
|
|
endAll()
Override to implement the closing of all connections.
|
|
Performs a query on one of the connection in this Pool.
|
|
removeConnection(conn)
Removes a connection from the pool.
|
|
returnConnection(connection)
Return a connection to the pool.
|
|
returnObject(connection)
Override comb.collections.Pool to allow async validation to allow
pools to do any calls to reset a connection if it needs to be done.
|
|
validate(connection)
Override to provide any additional validation.
|
Method Detail
{comb.Promise}
closeConnection(conn)
Override to implement close connection functionality;
- Parameters:
- {*} conn
- the connection to close;
- Returns:
- {comb.Promise} called back when the connection is closed.
createConnection()
Override to create connections to insert into this ConnectionPool.
{comb.Promise}
endAll()
Override to implement the closing of all connections.
- Returns:
- {comb.Promise} called when all connections are closed.
{comb.Promise}
getConnection()
Performs a query on one of the connection in this Pool.
- Returns:
- {comb.Promise} A promise to called back with a connection.
removeConnection(conn)
Removes a connection from the pool.
- Parameters:
- conn
{*}
returnConnection(connection)
Return a connection to the pool.
- Parameters:
- {*} connection
- the connection to return.
- Returns:
- {*} an adapter specific connection.
returnObject(connection)
Override comb.collections.Pool to allow async validation to allow
pools to do any calls to reset a connection if it needs to be done.
- Parameters:
- {*} connection
- the connection to return.
{comb.Promise}
validate(connection)
Override to provide any additional validation. By default the promise is called back with true.
- Parameters:
- {*} connection
- the conneciton to validate.
- Returns:
- {comb.Promise} called back with a valid or invalid state.