com.mchange.v2.resourcepool
Interface ResourcePool
- All Superinterfaces:
- com.mchange.v1.util.ClosableResource
- All Known Subinterfaces:
- EventSupportingResourcePool
public interface ResourcePool
- extends com.mchange.v1.util.ClosableResource
KNOWN_AND_AVAILABLE
static final int KNOWN_AND_AVAILABLE
- See Also:
- Constant Field Values
KNOWN_AND_CHECKED_OUT
static final int KNOWN_AND_CHECKED_OUT
- See Also:
- Constant Field Values
UNKNOWN_OR_PURGED
static final int UNKNOWN_OR_PURGED
- See Also:
- Constant Field Values
checkoutResource
java.lang.Object checkoutResource()
throws ResourcePoolException,
java.lang.InterruptedException
- Throws:
ResourcePoolException
java.lang.InterruptedException
checkoutResource
java.lang.Object checkoutResource(long timeout)
throws TimeoutException,
ResourcePoolException,
java.lang.InterruptedException
- Throws:
TimeoutException
ResourcePoolException
java.lang.InterruptedException
checkinResource
void checkinResource(java.lang.Object resc)
throws ResourcePoolException
- Throws:
ResourcePoolException
checkinAll
void checkinAll()
throws ResourcePoolException
- Throws:
ResourcePoolException
statusInPool
int statusInPool(java.lang.Object resc)
throws ResourcePoolException
- Throws:
ResourcePoolException
markBroken
void markBroken(java.lang.Object resc)
throws ResourcePoolException
- Marks a resource as broken. If the resource is checked in,
it will be destroyed immediately. Otherwise, it will be
destroyed on checkin.
- Throws:
ResourcePoolException
getMinPoolSize
int getMinPoolSize()
throws ResourcePoolException
- Throws:
ResourcePoolException
getMaxPoolSize
int getMaxPoolSize()
throws ResourcePoolException
- Throws:
ResourcePoolException
getPoolSize
int getPoolSize()
throws ResourcePoolException
- Throws:
ResourcePoolException
setPoolSize
void setPoolSize(int size)
throws ResourcePoolException
- Throws:
ResourcePoolException
getAvailableCount
int getAvailableCount()
throws ResourcePoolException
- Throws:
ResourcePoolException
getExcludedCount
int getExcludedCount()
throws ResourcePoolException
- Throws:
ResourcePoolException
getAwaitingCheckinCount
int getAwaitingCheckinCount()
throws ResourcePoolException
- Throws:
ResourcePoolException
getEffectiveExpirationEnforcementDelay
long getEffectiveExpirationEnforcementDelay()
throws ResourcePoolException
- Throws:
ResourcePoolException
getStartTime
long getStartTime()
throws ResourcePoolException
- Throws:
ResourcePoolException
getUpTime
long getUpTime()
throws ResourcePoolException
- Throws:
ResourcePoolException
getNumFailedCheckins
long getNumFailedCheckins()
throws ResourcePoolException
- Throws:
ResourcePoolException
getNumFailedCheckouts
long getNumFailedCheckouts()
throws ResourcePoolException
- Throws:
ResourcePoolException
getNumFailedIdleTests
long getNumFailedIdleTests()
throws ResourcePoolException
- Throws:
ResourcePoolException
getNumCheckoutWaiters
int getNumCheckoutWaiters()
throws ResourcePoolException
- Throws:
ResourcePoolException
getLastAcquisitionFailure
java.lang.Throwable getLastAcquisitionFailure()
throws ResourcePoolException
- Throws:
ResourcePoolException
getLastCheckinFailure
java.lang.Throwable getLastCheckinFailure()
throws ResourcePoolException
- Throws:
ResourcePoolException
getLastCheckoutFailure
java.lang.Throwable getLastCheckoutFailure()
throws ResourcePoolException
- Throws:
ResourcePoolException
getLastIdleCheckFailure
java.lang.Throwable getLastIdleCheckFailure()
throws ResourcePoolException
- Throws:
ResourcePoolException
getLastResourceTestFailure
java.lang.Throwable getLastResourceTestFailure()
throws ResourcePoolException
- Throws:
ResourcePoolException
resetPool
void resetPool()
throws ResourcePoolException
- Discards all resources managed by the pool
and reacquires new resources to populate the
pool. Current checked out resources will still
be valid, and should still be checked into the
pool (so the pool can destroy them).
- Throws:
ResourcePoolException
close
void close()
throws ResourcePoolException
- Specified by:
close
in interface com.mchange.v1.util.ClosableResource
- Throws:
ResourcePoolException
close
void close(boolean close_checked_out_resources)
throws ResourcePoolException
- Throws:
ResourcePoolException