| Package | Description |
|---|---|
| com.jolbox.bonecp |
The core package for the BoneCP connection pool.
|
| com.jolbox.bonecp.hooks |
Support for event notification on a connection state.
|
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionHandle |
StatementHandle.connectionHandle
Handle to the connection holding this statement.
|
| Modifier and Type | Method and Description |
|---|---|
static ConnectionHandle |
ConnectionHandle.createConnectionHandle(String url,
String username,
String password,
BoneCP pool)
Create a connection Handle.
|
protected static ConnectionHandle |
ConnectionHandle.createTestConnectionHandle(Connection connection,
IStatementCache preparedStatementCache,
IStatementCache callableStatementCache,
BoneCP pool)
Private -- used solely for unit testing.
|
ConnectionHandle |
DefaultConnectionStrategy.pollConnection() |
ConnectionHandle |
CachedConnectionStrategy.pollConnection() |
ConnectionHandle |
AbstractConnectionStrategy.pollConnection() |
ConnectionHandle |
ConnectionHandle.recreateConnectionHandle()
Creates the connection handle again.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<Connection,Reference<ConnectionHandle>> |
BoneCP.getFinalizableRefs()
Return the finalizable refs handle.
|
protected TransferQueue<ConnectionHandle> |
ConnectionPartition.getFreeConnections() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ConnectionPartition.addFreeConnection(ConnectionHandle connectionHandle)
Adds a free connection.
|
protected void |
ConnectionMaxAgeThread.closeConnection(ConnectionHandle connection)
Closes off this connection
|
protected void |
BoneCP.destroyConnection(ConnectionHandle conn) |
protected void |
BoneCP.internalReleaseConnection(ConnectionHandle connectionHandle)
Release a connection by placing the connection back in the pool.
|
boolean |
BoneCP.isConnectionHandleAlive(ConnectionHandle connection)
Sends a dummy statement to the server to keep the connection alive
|
protected static CallableStatement |
MemorizeTransactionProxy.memorize(CallableStatement target,
ConnectionHandle connectionHandle)
Wrap CallableStatement with a proxy.
|
protected static Connection |
MemorizeTransactionProxy.memorize(Connection target,
ConnectionHandle connectionHandle)
Wrap connection with a proxy.
|
protected static PreparedStatement |
MemorizeTransactionProxy.memorize(PreparedStatement target,
ConnectionHandle connectionHandle)
Wrap PreparedStatement with a proxy.
|
protected static Statement |
MemorizeTransactionProxy.memorize(Statement target,
ConnectionHandle connectionHandle)
Wrap Statement with a proxy.
|
protected void |
AbstractConnectionStrategy.postConnection(ConnectionHandle handle,
long statsObtainTime)
After obtaining a connection, perform additional tasks.
|
protected void |
BoneCP.postDestroyConnection(ConnectionHandle handle)
Update counters and call hooks.
|
protected void |
BoneCP.putConnectionBackInPartition(ConnectionHandle connectionHandle)
Places a connection back in the originating partition.
|
protected void |
ConnectionPartition.trackConnectionFinalizer(ConnectionHandle connectionHandle)
This method is a replacement for finalize() but avoids all its pitfalls (see Joshua Bloch et.
|
protected void |
BoneCP.watchConnection(ConnectionHandle connectionHandle)
Starts off a new thread to monitor this connection attempt.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ConnectionPartition.setFreeConnections(TransferQueue<ConnectionHandle> freeConnections) |
| Constructor and Description |
|---|
CallableStatementHandle(CallableStatement internalCallableStatement,
String sql,
ConnectionHandle connectionHandle,
String cacheKey,
IStatementCache cache)
CallableStatement constructor
|
CloseThreadMonitor(Thread threadToMonitor,
ConnectionHandle connectionHandle,
String stackTrace,
long closeConnectionWatchTimeout) |
PreparedStatementHandle(PreparedStatement internalPreparedStatement,
String sql,
ConnectionHandle connectionHandle,
String cacheKey,
IStatementCache cache)
PreparedStatement Wrapper constructor.
|
StatementHandle(Statement internalStatement,
ConnectionHandle connectionHandle,
boolean logStatementsEnabled)
Constructor for empty statement (created via connection.createStatement)
|
StatementHandle(Statement internalStatement,
String sql,
IStatementCache cache,
ConnectionHandle connectionHandle,
String cacheKey,
boolean logStatementsEnabled)
Constructor to statement handle wrapper.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ConnectionHook.onAcquire(ConnectionHandle connection)
Called upon getting a new connection from the JDBC driver (and prior to
inserting into the pool).
|
void |
AbstractConnectionHook.onAcquire(ConnectionHandle connection) |
void |
ConnectionHook.onAfterStatementExecute(ConnectionHandle conn,
StatementHandle statement,
String sql,
Map<Object,Object> params)
Called right after a statement has executed.
|
void |
AbstractConnectionHook.onAfterStatementExecute(ConnectionHandle conn,
StatementHandle statement,
String sql,
Map<Object,Object> params) |
void |
ConnectionHook.onBeforeStatementExecute(ConnectionHandle conn,
StatementHandle statement,
String sql,
Map<Object,Object> params)
Called before a statement is about to execute.
|
void |
AbstractConnectionHook.onBeforeStatementExecute(ConnectionHandle conn,
StatementHandle statement,
String sql,
Map<Object,Object> params) |
void |
ConnectionHook.onCheckIn(ConnectionHandle connection)
Called when the connection is about to be returned to the pool.
|
void |
AbstractConnectionHook.onCheckIn(ConnectionHandle connection) |
void |
ConnectionHook.onCheckOut(ConnectionHandle connection)
Called when the connection is extracted from the pool and about to be
given to the application.
|
void |
AbstractConnectionHook.onCheckOut(ConnectionHandle connection) |
boolean |
ConnectionHook.onConnectionException(ConnectionHandle connection,
String state,
Throwable t)
Called whenever an exception on a connection occurs.
|
boolean |
AbstractConnectionHook.onConnectionException(ConnectionHandle connection,
String state,
Throwable t) |
void |
ConnectionHook.onDestroy(ConnectionHandle connection)
Called when the connection is about to be completely removed from the
pool.
|
void |
AbstractConnectionHook.onDestroy(ConnectionHandle connection) |
ConnectionState |
ConnectionHook.onMarkPossiblyBroken(ConnectionHandle connection,
String state,
SQLException e)
Called to give you a chance to override the logic on whether a connection can be considered
broken or not.
|
ConnectionState |
AbstractConnectionHook.onMarkPossiblyBroken(ConnectionHandle connection,
String state,
SQLException e) |
void |
ConnectionHook.onQueryExecuteTimeLimitExceeded(ConnectionHandle conn,
Statement statement,
String sql,
Map<Object,Object> logParams)
Deprecated.
|
void |
AbstractConnectionHook.onQueryExecuteTimeLimitExceeded(ConnectionHandle handle,
Statement statement,
String sql,
Map<Object,Object> logParams)
Deprecated.
|
void |
ConnectionHook.onQueryExecuteTimeLimitExceeded(ConnectionHandle conn,
Statement statement,
String sql,
Map<Object,Object> logParams,
long timeElapsedInNs)
Called when a query execute time limit has been set and an executing query took longer
to than the limit to return control to the application.
|
void |
AbstractConnectionHook.onQueryExecuteTimeLimitExceeded(ConnectionHandle handle,
Statement statement,
String sql,
Map<Object,Object> logParams,
long timeElapsedInNs) |
Copyright © 2009-2012 JolBox. All Rights Reserved.