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 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  Object acquireResource()
          Deprecated.  
protected  void checkinResource(Object resc)
          Deprecated.  
protected  Object checkoutResource()
          Deprecated.  
protected  Object checkoutResource(long timeout)
          Deprecated.  
protected  void close()
          Deprecated.  
protected abstract  void destroyResource(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(Object resc)
          Deprecated.  
protected abstract  void refurbishResource(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 Object acquireResource()
                                   throws Exception
Deprecated. 
Throws:
Exception

refurbishResource

protected abstract void refurbishResource(Object resc)
                                   throws BrokenObjectException
Deprecated. 
Called on checkout!

Throws:
BrokenObjectException

destroyResource

protected abstract void destroyResource(Object resc)
                                 throws Exception
Deprecated. 
Throws:
Exception

init

protected void init()
             throws 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:
Exception

checkoutResource

protected Object checkoutResource()
                           throws BrokenObjectException,
                                  InterruptedException,
                                  Exception
Deprecated. 
Throws:
BrokenObjectException
InterruptedException
Exception

checkoutResource

protected Object checkoutResource(long timeout)
                           throws BrokenObjectException,
                                  InterruptedException,
                                  AbstractResourcePool.TimeoutException,
                                  Exception
Deprecated. 
Throws:
BrokenObjectException
InterruptedException
AbstractResourcePool.TimeoutException
Exception

checkinResource

protected void checkinResource(Object resc)
                        throws BrokenObjectException
Deprecated. 
Throws:
BrokenObjectException

markBad

protected void markBad(Object resc)
                throws Exception
Deprecated. 
Throws:
Exception

close

protected void close()
              throws Exception
Deprecated. 
Throws:
Exception