public interface ResourcePool
extends com.mchange.v1.util.ClosableResource
Modifier and Type | Interface and Description |
---|---|
static interface |
ResourcePool.Manager |
Modifier and Type | Field and Description |
---|---|
static int |
KNOWN_AND_AVAILABLE |
static int |
KNOWN_AND_CHECKED_OUT |
static int |
UNKNOWN_OR_PURGED |
Modifier and Type | Method and Description |
---|---|
void |
checkinAll() |
void |
checkinResource(java.lang.Object resc) |
java.lang.Object |
checkoutResource() |
java.lang.Object |
checkoutResource(long timeout) |
void |
close() |
void |
close(boolean close_checked_out_resources) |
int |
getAvailableCount() |
int |
getAwaitingCheckinCount() |
int |
getAwaitingCheckinNotExcludedCount() |
long |
getEffectiveExpirationEnforcementDelay() |
int |
getExcludedCount() |
java.lang.Throwable |
getLastAcquisitionFailure() |
java.lang.Throwable |
getLastCheckinFailure() |
java.lang.Throwable |
getLastCheckoutFailure() |
java.lang.Throwable |
getLastIdleCheckFailure() |
java.lang.Throwable |
getLastResourceTestFailure() |
int |
getMaxPoolSize() |
int |
getMinPoolSize() |
int |
getNumCheckoutWaiters() |
long |
getNumFailedCheckins() |
long |
getNumFailedCheckouts() |
long |
getNumFailedIdleTests() |
int |
getPoolSize() |
long |
getStartTime() |
long |
getUpTime() |
void |
markBroken(java.lang.Object resc)
Marks a resource as broken.
|
void |
resetPool()
Discards all resources managed by the pool
and reacquires new resources to populate the
pool.
|
void |
setPoolSize(int size) |
int |
statusInPool(java.lang.Object resc) |
static final int KNOWN_AND_AVAILABLE
static final int KNOWN_AND_CHECKED_OUT
static final int UNKNOWN_OR_PURGED
java.lang.Object checkoutResource() throws ResourcePoolException, java.lang.InterruptedException
ResourcePoolException
java.lang.InterruptedException
java.lang.Object checkoutResource(long timeout) throws TimeoutException, ResourcePoolException, java.lang.InterruptedException
TimeoutException
ResourcePoolException
java.lang.InterruptedException
void checkinResource(java.lang.Object resc) throws ResourcePoolException
ResourcePoolException
void checkinAll() throws ResourcePoolException
ResourcePoolException
int statusInPool(java.lang.Object resc) throws ResourcePoolException
ResourcePoolException
void markBroken(java.lang.Object resc) throws ResourcePoolException
ResourcePoolException
int getMinPoolSize() throws ResourcePoolException
ResourcePoolException
int getMaxPoolSize() throws ResourcePoolException
ResourcePoolException
int getPoolSize() throws ResourcePoolException
ResourcePoolException
void setPoolSize(int size) throws ResourcePoolException
ResourcePoolException
int getAvailableCount() throws ResourcePoolException
ResourcePoolException
int getExcludedCount() throws ResourcePoolException
ResourcePoolException
int getAwaitingCheckinCount() throws ResourcePoolException
ResourcePoolException
int getAwaitingCheckinNotExcludedCount() throws ResourcePoolException
ResourcePoolException
long getEffectiveExpirationEnforcementDelay() throws ResourcePoolException
ResourcePoolException
long getStartTime() throws ResourcePoolException
ResourcePoolException
long getUpTime() throws ResourcePoolException
ResourcePoolException
long getNumFailedCheckins() throws ResourcePoolException
ResourcePoolException
long getNumFailedCheckouts() throws ResourcePoolException
ResourcePoolException
long getNumFailedIdleTests() throws ResourcePoolException
ResourcePoolException
int getNumCheckoutWaiters() throws ResourcePoolException
ResourcePoolException
java.lang.Throwable getLastAcquisitionFailure() throws ResourcePoolException
ResourcePoolException
java.lang.Throwable getLastCheckinFailure() throws ResourcePoolException
ResourcePoolException
java.lang.Throwable getLastCheckoutFailure() throws ResourcePoolException
ResourcePoolException
java.lang.Throwable getLastIdleCheckFailure() throws ResourcePoolException
ResourcePoolException
java.lang.Throwable getLastResourceTestFailure() throws ResourcePoolException
ResourcePoolException
void resetPool() throws ResourcePoolException
ResourcePoolException
void close() throws ResourcePoolException
close
in interface com.mchange.v1.util.ClosableResource
ResourcePoolException
void close(boolean close_checked_out_resources) throws ResourcePoolException
ResourcePoolException