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 protected
ConnectionBundlePoolImpl(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.Object
acquireResource()
void
checkinBundle(ConnectionBundle bndl)
ConnectionBundle
checkoutBundle()
void
close()
forces the release of any resources that might be associated with this object.protected void
destroyResource(java.lang.Object resc)
protected void
init(java.lang.String jdbcUrl, java.lang.String username, java.lang.String pwd)
protected void
refurbishResource(java.lang.Object resc)
Called on checkout!protected abstract void
setConnectionOptions(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:
checkoutBundle
in interfaceConnectionBundlePool
- Throws:
java.sql.SQLException
BrokenObjectException
java.lang.InterruptedException
-
checkinBundle
public void checkinBundle(ConnectionBundle bndl) throws BrokenObjectException
- Specified by:
checkinBundle
in interfaceConnectionBundlePool
- Throws:
BrokenObjectException
-
close
public void close() throws java.sql.SQLException
Description copied from interface:ClosableResource
forces the release of any resources that might be associated with this object.- Specified by:
close
in interfaceClosableResource
- Specified by:
close
in interfaceConnectionBundlePool
- Overrides:
close
in classAbstractResourcePool
- Throws:
java.sql.SQLException
-
acquireResource
protected java.lang.Object acquireResource() throws java.lang.Exception
- Specified by:
acquireResource
in classAbstractResourcePool
- Throws:
java.lang.Exception
-
refurbishResource
protected void refurbishResource(java.lang.Object resc) throws BrokenObjectException
Description copied from class:AbstractResourcePool
Called on checkout!- Specified by:
refurbishResource
in classAbstractResourcePool
- Throws:
BrokenObjectException
-
destroyResource
protected void destroyResource(java.lang.Object resc) throws java.lang.Exception
- Specified by:
destroyResource
in classAbstractResourcePool
- Throws:
java.lang.Exception
-
setConnectionOptions
protected abstract void setConnectionOptions(java.sql.Connection con) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-