public abstract class AbstractResourcePool extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractResourcePool.TimeoutException
Deprecated.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractResourcePool(int start,
int max,
int inc)
Deprecated.
|
protected |
AbstractResourcePool(int start,
int max,
int inc,
RunnableQueue rq)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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!
|
protected AbstractResourcePool(int start, int max, int inc)
protected AbstractResourcePool(int start, int max, int inc, RunnableQueue rq)
protected abstract Object acquireResource() throws Exception
Exception
protected abstract void refurbishResource(Object resc) throws BrokenObjectException
BrokenObjectException
protected abstract void destroyResource(Object resc) throws Exception
Exception
protected void init() throws Exception
Exception
protected Object checkoutResource() throws BrokenObjectException, InterruptedException, Exception
protected Object checkoutResource(long timeout) throws BrokenObjectException, InterruptedException, AbstractResourcePool.TimeoutException, Exception
protected void checkinResource(Object resc) throws BrokenObjectException
BrokenObjectException
Copyright © 2017 com.mchange. All rights reserved.