Package com.mchange.v1.util
Class AbstractResourcePool
- java.lang.Object
-
- com.mchange.v1.util.AbstractResourcePool
-
- Direct Known Subclasses:
ConnectionBundlePoolImpl
public abstract class AbstractResourcePool extends java.lang.Object
Deprecated.use com.mchange.v1.resourcepool.AbstractResourcePool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractResourcePool.TimeoutException
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResourcePool(int start, int max, int inc)
Deprecated.protected
AbstractResourcePool(int start, int max, int inc, RunnableQueue rq)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract java.lang.Object
acquireResource()
Deprecated.protected void
checkinResource(java.lang.Object resc)
Deprecated.protected java.lang.Object
checkoutResource()
Deprecated.protected java.lang.Object
checkoutResource(long timeout)
Deprecated.protected void
close()
Deprecated.protected abstract void
destroyResource(java.lang.Object resc)
Deprecated.protected void
init()
Deprecated.We defer actual acquisition of the resources to a method outside the constructor because subclasses may need to do prep work in their own constructor before resource acquisition can occur.protected void
markBad(java.lang.Object resc)
Deprecated.protected abstract void
refurbishResource(java.lang.Object resc)
Deprecated.Called on checkout!
-
-
-
Constructor Detail
-
AbstractResourcePool
protected AbstractResourcePool(int start, int max, int inc)
Deprecated.
-
AbstractResourcePool
protected AbstractResourcePool(int start, int max, int inc, RunnableQueue rq)
Deprecated.
-
-
Method Detail
-
acquireResource
protected abstract java.lang.Object acquireResource() throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
refurbishResource
protected abstract void refurbishResource(java.lang.Object resc) throws BrokenObjectException
Deprecated.Called on checkout!- Throws:
BrokenObjectException
-
destroyResource
protected abstract void destroyResource(java.lang.Object resc) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
init
protected void init() throws java.lang.Exception
Deprecated.We defer actual acquisition of the resources to a method outside the constructor because subclasses may need to do prep work in their own constructor before resource acquisition can occur. This method will usually be called at the end of a subclasses constructor.- Throws:
java.lang.Exception
-
checkoutResource
protected java.lang.Object checkoutResource() throws BrokenObjectException, java.lang.InterruptedException, java.lang.Exception
Deprecated.- Throws:
BrokenObjectException
java.lang.InterruptedException
java.lang.Exception
-
checkoutResource
protected java.lang.Object checkoutResource(long timeout) throws BrokenObjectException, java.lang.InterruptedException, AbstractResourcePool.TimeoutException, java.lang.Exception
Deprecated.- Throws:
BrokenObjectException
java.lang.InterruptedException
AbstractResourcePool.TimeoutException
java.lang.Exception
-
checkinResource
protected void checkinResource(java.lang.Object resc) throws BrokenObjectException
Deprecated.- Throws:
BrokenObjectException
-
markBad
protected void markBad(java.lang.Object resc) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
close
protected void close() throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
-