|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jolbox.bonecp.AbstractConnectionStrategy
public abstract class AbstractConnectionStrategy
Parent class for the different pool strategies.
| Field Summary | |
|---|---|
protected BoneCP |
pool
Pool handle |
protected Lock |
terminationLock
Prevent repeated termination of all connections when the DB goes down. |
| Constructor Summary | |
|---|---|
AbstractConnectionStrategy()
|
|
| Method Summary | |
|---|---|
Connection |
getConnection()
Obtains a connection using the configured strategy. |
protected abstract Connection |
getConnectionInternal()
Actual call that returns a connection |
ConnectionHandle |
pollConnection()
Obtains a connection using the configured strategy without blocking. |
protected void |
postConnection(ConnectionHandle handle,
long statsObtainTime)
After obtaining a connection, perform additional tasks. |
protected long |
preConnection()
Prep for a new connection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jolbox.bonecp.ConnectionStrategy |
|---|
terminateAllConnections |
| Field Detail |
|---|
protected BoneCP pool
protected Lock terminationLock
| Constructor Detail |
|---|
public AbstractConnectionStrategy()
| Method Detail |
|---|
protected long preConnection()
throws SQLException
SQLException
protected void postConnection(ConnectionHandle handle,
long statsObtainTime)
handle - statsObtainTime -
public Connection getConnection()
throws SQLException
ConnectionStrategy
getConnection in interface ConnectionStrategySQLException - on error
protected abstract Connection getConnectionInternal()
throws SQLException
SQLExceptionpublic ConnectionHandle pollConnection()
ConnectionStrategy
pollConnection in interface ConnectionStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||