Package com.mchange.v1.db.sql
Class ConnectionBundlePoolImpl
- java.lang.Object
-
- com.mchange.v1.util.AbstractResourcePool
-
- com.mchange.v1.db.sql.ConnectionBundlePoolImpl
-
- All Implemented Interfaces:
ConnectionBundlePool,ClosableResource
public abstract class ConnectionBundlePoolImpl extends AbstractResourcePool implements ConnectionBundlePool
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mchange.v1.util.AbstractResourcePool
AbstractResourcePool.TimeoutException
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConnectionBundlePoolImpl(int start, int max, int inc)ConnectionBundlePoolImpl(java.lang.String jdbcUrl, java.lang.String username, java.lang.String pwd, int start, int max, int inc)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectacquireResource()voidcheckinBundle(ConnectionBundle bndl)ConnectionBundlecheckoutBundle()voidclose()forces the release of any resources that might be associated with this object.protected voiddestroyResource(java.lang.Object resc)protected voidinit(java.lang.String jdbcUrl, java.lang.String username, java.lang.String pwd)protected voidrefurbishResource(java.lang.Object resc)Called on checkout!protected abstract voidsetConnectionOptions(java.sql.Connection con)-
Methods inherited from class com.mchange.v1.util.AbstractResourcePool
checkinResource, checkoutResource, checkoutResource, init, markBad
-
-
-
-
Constructor Detail
-
ConnectionBundlePoolImpl
public ConnectionBundlePoolImpl(java.lang.String jdbcUrl, java.lang.String username, java.lang.String pwd, int start, int max, int inc) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
ConnectionBundlePoolImpl
protected ConnectionBundlePoolImpl(int start, int max, int inc)
-
-
Method Detail
-
init
protected void init(java.lang.String jdbcUrl, java.lang.String username, java.lang.String pwd) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
checkoutBundle
public ConnectionBundle checkoutBundle() throws java.sql.SQLException, BrokenObjectException, java.lang.InterruptedException
- Specified by:
checkoutBundlein interfaceConnectionBundlePool- Throws:
java.sql.SQLExceptionBrokenObjectExceptionjava.lang.InterruptedException
-
checkinBundle
public void checkinBundle(ConnectionBundle bndl) throws BrokenObjectException
- Specified by:
checkinBundlein interfaceConnectionBundlePool- Throws:
BrokenObjectException
-
close
public void close() throws java.sql.SQLExceptionDescription copied from interface:ClosableResourceforces the release of any resources that might be associated with this object.- Specified by:
closein interfaceClosableResource- Specified by:
closein interfaceConnectionBundlePool- Overrides:
closein classAbstractResourcePool- Throws:
java.sql.SQLException
-
acquireResource
protected java.lang.Object acquireResource() throws java.lang.Exception- Specified by:
acquireResourcein classAbstractResourcePool- Throws:
java.lang.Exception
-
refurbishResource
protected void refurbishResource(java.lang.Object resc) throws BrokenObjectExceptionDescription copied from class:AbstractResourcePoolCalled on checkout!- Specified by:
refurbishResourcein classAbstractResourcePool- Throws:
BrokenObjectException
-
destroyResource
protected void destroyResource(java.lang.Object resc) throws java.lang.Exception- Specified by:
destroyResourcein classAbstractResourcePool- Throws:
java.lang.Exception
-
setConnectionOptions
protected abstract void setConnectionOptions(java.sql.Connection con) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-