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.ObjectDeprecated.use com.mchange.v1.resourcepool.AbstractResourcePool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractResourcePool.TimeoutExceptionDeprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResourcePool(int start, int max, int inc)Deprecated.protectedAbstractResourcePool(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.ObjectacquireResource()Deprecated.protected voidcheckinResource(java.lang.Object resc)Deprecated.protected java.lang.ObjectcheckoutResource()Deprecated.protected java.lang.ObjectcheckoutResource(long timeout)Deprecated.protected voidclose()Deprecated.protected abstract voiddestroyResource(java.lang.Object resc)Deprecated.protected voidinit()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 voidmarkBad(java.lang.Object resc)Deprecated.protected abstract voidrefurbishResource(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.ExceptionDeprecated.- Throws:
java.lang.Exception
-
refurbishResource
protected abstract void refurbishResource(java.lang.Object resc) throws BrokenObjectExceptionDeprecated.Called on checkout!- Throws:
BrokenObjectException
-
destroyResource
protected abstract void destroyResource(java.lang.Object resc) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
init
protected void init() throws java.lang.ExceptionDeprecated.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.ExceptionDeprecated.- Throws:
BrokenObjectExceptionjava.lang.InterruptedExceptionjava.lang.Exception
-
checkoutResource
protected java.lang.Object checkoutResource(long timeout) throws BrokenObjectException, java.lang.InterruptedException, AbstractResourcePool.TimeoutException, java.lang.ExceptionDeprecated.- Throws:
BrokenObjectExceptionjava.lang.InterruptedExceptionAbstractResourcePool.TimeoutExceptionjava.lang.Exception
-
checkinResource
protected void checkinResource(java.lang.Object resc) throws BrokenObjectExceptionDeprecated.- Throws:
BrokenObjectException
-
markBad
protected void markBad(java.lang.Object resc) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
close
protected void close() throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
-