Package 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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkinResource
(Object resc) checkoutResource
(long timeout) void
close()
void
close
(boolean close_checked_out_resources) int
int
int
long
int
int
int
int
long
long
long
int
long
long
void
markBroken
(Object resc) Marks a resource as broken.void
Discards all resources managed by the pool and reacquires new resources to populate the pool.void
setPoolSize
(int size) int
statusInPool
(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:
close
in interfacecom.mchange.v1.util.ClosableResource
- Throws:
ResourcePoolException
-
close
- Throws:
ResourcePoolException
-