Top Inners Fields Methods
com.mchange.v2.resourcepool

public Interface ResourcePool

extends ClosableResource
Known Direct Subinterfaces
com.mchange.v2.resourcepool.EventSupportingResourcePool
Known Direct Implementers
com.mchange.v2.resourcepool.BasicResourcePool
Imports
com.mchange.v1.util.ClosableResource

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public void
public void
public Object
public Object
checkoutResource(long timeout)

public void
close()

Redeclares com.mchange.v1.util.ClosableResource.close.

forces the release of any resources that might be associated with this object.

public void
close(boolean close_checked_out_resources)

public int
public int
public int
public long
public int
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public int
public int
public int
public long
public long
public long
public int
public long
public long
public void
markBroken(Object resc)

Marks a resource as broken.

public void
resetPool()

Discards all resources managed by the pool and reacquires new resources to populate the pool.

public void
setPoolSize(int size)

public int

Field Detail

KNOWN_AND_AVAILABLEback to summary
public static final int KNOWN_AND_AVAILABLE
KNOWN_AND_CHECKED_OUTback to summary
public static final int KNOWN_AND_CHECKED_OUT
UNKNOWN_OR_PURGEDback to summary
public static final int UNKNOWN_OR_PURGED

Method Detail

checkinAllback to summary
public void checkinAll() throws ResourcePoolException
checkinResourceback to summary
public void checkinResource(Object resc) throws ResourcePoolException
checkoutResourceback to summary
public Object checkoutResource() throws ResourcePoolException, InterruptedException
checkoutResourceback to summary
public Object checkoutResource(long timeout) throws TimeoutException, ResourcePoolException, InterruptedException
closeback to summary
public void close() throws ResourcePoolException

Redeclares com.mchange.v1.util.ClosableResource.close.

Doc from com.mchange.v1.util.ClosableResource.close.

forces the release of any resources that might be associated with this object.

closeback to summary
public void close(boolean close_checked_out_resources) throws ResourcePoolException
getAvailableCountback to summary
public int getAvailableCount() throws ResourcePoolException
getAwaitingCheckinCountback to summary
public int getAwaitingCheckinCount() throws ResourcePoolException
getAwaitingCheckinNotExcludedCountback to summary
public int getAwaitingCheckinNotExcludedCount() throws ResourcePoolException
getEffectiveExpirationEnforcementDelayback to summary
public long getEffectiveExpirationEnforcementDelay() throws ResourcePoolException
getExcludedCountback to summary
public int getExcludedCount() throws ResourcePoolException
getLastAcquisitionFailureback to summary
public Throwable getLastAcquisitionFailure() throws ResourcePoolException
getLastCheckinFailureback to summary
public Throwable getLastCheckinFailure() throws ResourcePoolException
getLastCheckoutFailureback to summary
public Throwable getLastCheckoutFailure() throws ResourcePoolException
getLastIdleCheckFailureback to summary
public Throwable getLastIdleCheckFailure() throws ResourcePoolException
getLastResourceTestFailureback to summary
public Throwable getLastResourceTestFailure() throws ResourcePoolException
getMaxPoolSizeback to summary
public int getMaxPoolSize() throws ResourcePoolException
getMinPoolSizeback to summary
public int getMinPoolSize() throws ResourcePoolException
getNumCheckoutWaitersback to summary
public int getNumCheckoutWaiters() throws ResourcePoolException
getNumFailedCheckinsback to summary
public long getNumFailedCheckins() throws ResourcePoolException
getNumFailedCheckoutsback to summary
public long getNumFailedCheckouts() throws ResourcePoolException
getNumFailedIdleTestsback to summary
public long getNumFailedIdleTests() throws ResourcePoolException
getPoolSizeback to summary
public int getPoolSize() throws ResourcePoolException
getStartTimeback to summary
public long getStartTime() throws ResourcePoolException
getUpTimeback to summary
public long getUpTime() throws ResourcePoolException
markBrokenback to summary
public void markBroken(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.

resetPoolback to summary
public 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).

setPoolSizeback to summary
public void setPoolSize(int size) throws ResourcePoolException
statusInPoolback to summary
public int statusInPool(Object resc) throws ResourcePoolException
com.mchange.v2.resourcepool back to summary

public Interface ResourcePool.Manager


Method Summary

Modifier and TypeMethod and Description
public Object
public void
destroyResource(Object resc, boolean checked_out)

public void
public void
public void

Method Detail

acquireResourceback to summary
public Object acquireResource() throws Exception
destroyResourceback to summary
public void destroyResource(Object resc, boolean checked_out) throws Exception
refurbishIdleResourceback to summary
public void refurbishIdleResource(Object resc) throws Exception
refurbishResourceOnCheckinback to summary
public void refurbishResourceOnCheckin(Object resc) throws Exception
refurbishResourceOnCheckoutback to summary
public void refurbishResourceOnCheckout(Object resc) throws Exception