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 SummaryNested Classes Modifier and Type Interface Description static interfaceResourcePool.Manager
 - 
Field SummaryFields Modifier and Type Field Description static intKNOWN_AND_AVAILABLEstatic intKNOWN_AND_CHECKED_OUTstatic intUNKNOWN_OR_PURGED
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckinAll()voidcheckinResource(java.lang.Object resc)java.lang.ObjectcheckoutResource()java.lang.ObjectcheckoutResource(long timeout)voidclose()voidclose(boolean close_checked_out_resources)intgetAvailableCount()intgetAwaitingCheckinCount()intgetAwaitingCheckinNotExcludedCount()longgetEffectiveExpirationEnforcementDelay()intgetExcludedCount()java.lang.ThrowablegetLastAcquisitionFailure()java.lang.ThrowablegetLastCheckinFailure()java.lang.ThrowablegetLastCheckoutFailure()java.lang.ThrowablegetLastIdleCheckFailure()java.lang.ThrowablegetLastResourceTestFailure()intgetMaxPoolSize()intgetMinPoolSize()intgetNumCheckoutWaiters()longgetNumFailedCheckins()longgetNumFailedCheckouts()longgetNumFailedIdleTests()intgetPoolSize()longgetStartTime()longgetUpTime()voidmarkBroken(java.lang.Object resc)Marks a resource as broken.voidresetPool()Discards all resources managed by the pool and reacquires new resources to populate the pool.voidsetPoolSize(int size)intstatusInPool(java.lang.Object resc)
 
- 
- 
- 
Field Detail- 
KNOWN_AND_AVAILABLEstatic final int KNOWN_AND_AVAILABLE - See Also:
- Constant Field Values
 
 - 
KNOWN_AND_CHECKED_OUTstatic final int KNOWN_AND_CHECKED_OUT - See Also:
- Constant Field Values
 
 - 
UNKNOWN_OR_PURGEDstatic final int UNKNOWN_OR_PURGED - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
checkoutResourcejava.lang.Object checkoutResource() throws ResourcePoolException, java.lang.InterruptedException- Throws:
- ResourcePoolException
- java.lang.InterruptedException
 
 - 
checkoutResourcejava.lang.Object checkoutResource(long timeout) throws TimeoutException, ResourcePoolException, java.lang.InterruptedException- Throws:
- TimeoutException
- ResourcePoolException
- java.lang.InterruptedException
 
 - 
checkinResourcevoid checkinResource(java.lang.Object resc) throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
checkinAllvoid checkinAll() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
statusInPoolint statusInPool(java.lang.Object resc) throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
markBrokenvoid markBroken(java.lang.Object resc) throws ResourcePoolExceptionMarks a resource as broken. If the resource is checked in, it will be destroyed immediately. Otherwise, it will be destroyed on checkin.- Throws:
- ResourcePoolException
 
 - 
getMinPoolSizeint getMinPoolSize() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getMaxPoolSizeint getMaxPoolSize() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getPoolSizeint getPoolSize() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
setPoolSizevoid setPoolSize(int size) throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getAvailableCountint getAvailableCount() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getExcludedCountint getExcludedCount() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getAwaitingCheckinCountint getAwaitingCheckinCount() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getAwaitingCheckinNotExcludedCountint getAwaitingCheckinNotExcludedCount() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getEffectiveExpirationEnforcementDelaylong getEffectiveExpirationEnforcementDelay() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getStartTimelong getStartTime() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getUpTimelong getUpTime() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getNumFailedCheckinslong getNumFailedCheckins() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getNumFailedCheckoutslong getNumFailedCheckouts() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getNumFailedIdleTestslong getNumFailedIdleTests() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getNumCheckoutWaitersint getNumCheckoutWaiters() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getLastAcquisitionFailurejava.lang.Throwable getLastAcquisitionFailure() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getLastCheckinFailurejava.lang.Throwable getLastCheckinFailure() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getLastCheckoutFailurejava.lang.Throwable getLastCheckoutFailure() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getLastIdleCheckFailurejava.lang.Throwable getLastIdleCheckFailure() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
getLastResourceTestFailurejava.lang.Throwable getLastResourceTestFailure() throws ResourcePoolException- Throws:
- ResourcePoolException
 
 - 
resetPoolvoid resetPool() throws ResourcePoolExceptionDiscards 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
 
 - 
closevoid close() throws ResourcePoolException- Specified by:
- closein interface- com.mchange.v1.util.ClosableResource
- Throws:
- ResourcePoolException
 
 - 
closevoid close(boolean close_checked_out_resources) throws ResourcePoolException- Throws:
- ResourcePoolException
 
 
- 
 
-