com.mchange.v1.util
Class AbstractResourcePool

java.lang.Object
  extended by com.mchange.v1.util.AbstractResourcePool
Direct Known Subclasses:
ConnectionBundlePoolImpl

Deprecated. use com.mchange.v1.resourcepool.AbstractResourcePool

public abstract class AbstractResourcePool
extends java.lang.Object


Nested Class Summary
protected  class AbstractResourcePool.TimeoutException
          Deprecated.  
 
Constructor Summary
protected AbstractResourcePool(int start, int max, int inc)
          Deprecated.  
protected AbstractResourcePool(int start, int max, int inc, RunnableQueue rq)
          Deprecated.  
 
Method Summary
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!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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