Interface ResourcePool
- All Superinterfaces:
com.mchange.v1.util.ClosableResource
- All Known Subinterfaces:
EventSupportingResourcePool
public interface ResourcePool
extends com.mchange.v1.util.ClosableResource
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcheckinResource(Object resc) checkoutResource(long timeout) voidclose()voidclose(boolean close_checked_out_resources) intintintlongintintintintlonglonglongintlonglongvoidmarkBroken(Object resc) Marks a resource as broken.voidDiscards all resources managed by the pool and reacquires new resources to populate the pool.voidsetPoolSize(int size) intstatusInPool(Object resc)
-
Field Details
-
KNOWN_AND_AVAILABLE
static final int KNOWN_AND_AVAILABLE- See Also:
-
KNOWN_AND_CHECKED_OUT
static final int KNOWN_AND_CHECKED_OUT- See Also:
-
UNKNOWN_OR_PURGED
static final int UNKNOWN_OR_PURGED- See Also:
-
-
Method Details
-
checkoutResource
-
checkoutResource
Object checkoutResource(long timeout) throws TimeoutException, ResourcePoolException, InterruptedException -
checkinResource
- Throws:
ResourcePoolException
-
checkinAll
- Throws:
ResourcePoolException
-
statusInPool
- Throws:
ResourcePoolException
-
markBroken
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
- Throws:
ResourcePoolException
-
getMaxPoolSize
- Throws:
ResourcePoolException
-
getPoolSize
- Throws:
ResourcePoolException
-
setPoolSize
- Throws:
ResourcePoolException
-
getAvailableCount
- Throws:
ResourcePoolException
-
getExcludedCount
- Throws:
ResourcePoolException
-
getAwaitingCheckinCount
- Throws:
ResourcePoolException
-
getAwaitingCheckinNotExcludedCount
- Throws:
ResourcePoolException
-
getEffectiveExpirationEnforcementDelay
- Throws:
ResourcePoolException
-
getStartTime
- Throws:
ResourcePoolException
-
getUpTime
- Throws:
ResourcePoolException
-
getNumFailedCheckins
- Throws:
ResourcePoolException
-
getNumFailedCheckouts
- Throws:
ResourcePoolException
-
getNumFailedIdleTests
- Throws:
ResourcePoolException
-
getNumCheckoutWaiters
- Throws:
ResourcePoolException
-
getLastAcquisitionFailure
- Throws:
ResourcePoolException
-
getLastCheckinFailure
- Throws:
ResourcePoolException
-
getLastCheckoutFailure
- Throws:
ResourcePoolException
-
getLastIdleCheckFailure
- Throws:
ResourcePoolException
-
getLastResourceTestFailure
- Throws:
ResourcePoolException
-
resetPool
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
- Specified by:
closein interfacecom.mchange.v1.util.ClosableResource- Throws:
ResourcePoolException
-
close
- Throws:
ResourcePoolException
-