A Factory for ResourcePools. ResourcePoolFactories may manage resources (usually threads that perform maintenance tasks) that are shared by all pools that they create. Clients who require a large number of pools may wish to create their own factory instances rather than using the shared instance to control the degree of resource (Thread) sharing among pools.
Factories should (and the default implementation does) be careful to ensure that factories keep resources open only while there are active ResourcePools that they have created.
Subclasses must mark all methods synchronized so that clients may reliably use shared factories to do stuff like...
synchronized (factory)
{
factory.setMin(8);
factory.setMax(24);
ResourcePool rp = factory.createPool();
}
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final ResourcePoolFactory |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ResourcePoolFactory | |
| public static ResourcePoolFactory | |
| public static ResourcePoolFactory | createInstance(AsynchronousRunner taskRunner, RunnableQueue asyncEventQueue, Timer cullTimer)
Any or all of these arguments can be null -- any unspecified resources will be created and cleaned up internally. |
| public static ResourcePoolFactory | |
| public abstract ResourcePool | |
| public abstract int | |
| public abstract int | |
| public abstract boolean | |
| public abstract boolean | |
| public abstract long | |
| public abstract long | |
| public abstract long | |
| public abstract boolean | |
| public abstract long | |
| public abstract int | |
| public abstract int | |
| public abstract int | |
| public abstract long | |
| public abstract long | |
| public static ResourcePoolFactory | |
| public abstract int | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void |
| DEFAULT_NUM_TASK_THREADS | back to summary |
|---|---|
| pack-priv static final int DEFAULT_NUM_TASK_THREADS | |
| SHARED_INSTANCE | back to summary |
|---|---|
| pack-priv static final ResourcePoolFactory SHARED_INSTANCE | |
| ResourcePoolFactory | back to summary |
|---|---|
| public ResourcePoolFactory() | |
| createInstance | back to summary |
|---|---|
| public static ResourcePoolFactory createInstance() | |
| createInstance | back to summary |
|---|---|
| public static ResourcePoolFactory createInstance(int num_task_threads) | |
| createInstance | back to summary |
|---|---|
| public static ResourcePoolFactory createInstance(AsynchronousRunner taskRunner, RunnableQueue asyncEventQueue, Timer cullTimer) Any or all of these arguments can be null -- any unspecified resources will be created and cleaned up internally. | |
| createInstance | back to summary |
|---|---|
| public static ResourcePoolFactory createInstance(Queuable taskRunnerEventQueue, Timer cullTimer) | |
| createPool | back to summary |
|---|---|
| public abstract ResourcePool createPool(ResourcePool. | |
| getAcquisitionRetryAttempts | back to summary |
|---|---|
| public abstract int getAcquisitionRetryAttempts() throws ResourcePoolException | |
| getAcquisitionRetryDelay | back to summary |
|---|---|
| public abstract int getAcquisitionRetryDelay() throws ResourcePoolException | |
| getBreakOnAcquisitionFailure | back to summary |
|---|---|
| public abstract boolean getBreakOnAcquisitionFailure() throws ResourcePoolException | |
| getDebugStoreCheckoutStackTrace | back to summary |
|---|---|
| public abstract boolean getDebugStoreCheckoutStackTrace() throws ResourcePoolException | |
| getDestroyOverdueResourceTime | back to summary |
|---|---|
| public abstract long getDestroyOverdueResourceTime() throws ResourcePoolException | |
| getExcessResourceMaxIdleTime | back to summary |
|---|---|
| public abstract long getExcessResourceMaxIdleTime() throws ResourcePoolException | |
| getExpirationEnforcementDelay | back to summary |
|---|---|
| public abstract long getExpirationEnforcementDelay() throws ResourcePoolException | |
| getForceSynchronousCheckins | back to summary |
|---|---|
| public abstract boolean getForceSynchronousCheckins() throws ResourcePoolException | |
| getIdleResourceTestPeriod | back to summary |
|---|---|
| public abstract long getIdleResourceTestPeriod() throws ResourcePoolException | |
| getIncrement | back to summary |
|---|---|
| public abstract int getIncrement() throws ResourcePoolException | |
| getMax | back to summary |
|---|---|
| public abstract int getMax() throws ResourcePoolException | |
| getMin | back to summary |
|---|---|
| public abstract int getMin() throws ResourcePoolException | |
| getResourceMaxAge | back to summary |
|---|---|
| public abstract long getResourceMaxAge() throws ResourcePoolException | |
| getResourceMaxIdleTime | back to summary |
|---|---|
| public abstract long getResourceMaxIdleTime() throws ResourcePoolException | |
| getSharedInstance | back to summary |
|---|---|
| public static ResourcePoolFactory getSharedInstance() throws ResourcePoolException | |
| getStart | back to summary |
|---|---|
| public abstract int getStart() throws ResourcePoolException | |
| setAcquisitionRetryAttempts | back to summary |
|---|---|
| public abstract void setAcquisitionRetryAttempts(int retry_attempts) throws ResourcePoolException | |
| setAcquisitionRetryDelay | back to summary |
|---|---|
| public abstract void setAcquisitionRetryDelay(int retry_delay) throws ResourcePoolException | |
| setBreakOnAcquisitionFailure | back to summary |
|---|---|
| public abstract void setBreakOnAcquisitionFailure(boolean b) throws ResourcePoolException | |
| setDebugStoreCheckoutStackTrace | back to summary |
|---|---|
| public abstract void setDebugStoreCheckoutStackTrace(boolean debug_store_checkout_stacktrace) throws ResourcePoolException | |
| setDestroyOverdueResourceTime | back to summary |
|---|---|
| public abstract void setDestroyOverdueResourceTime(long millis) throws ResourcePoolException | |
| setExcessResourceMaxIdleTime | back to summary |
|---|---|
| public abstract void setExcessResourceMaxIdleTime(long millis) throws ResourcePoolException | |
| setExpirationEnforcementDelay | back to summary |
|---|---|
| public abstract void setExpirationEnforcementDelay(long millis) throws ResourcePoolException | |
| setForceSynchronousCheckins | back to summary |
|---|---|
| public abstract void setForceSynchronousCheckins(boolean force_synchronous_checkins) throws ResourcePoolException | |
| setIdleResourceTestPeriod | back to summary |
|---|---|
| public abstract void setIdleResourceTestPeriod(long test_period) throws ResourcePoolException | |
| setIncrement | back to summary |
|---|---|
| public abstract void setIncrement(int max) throws ResourcePoolException | |
| setMax | back to summary |
|---|---|
| public abstract void setMax(int max) throws ResourcePoolException | |
| setMin | back to summary |
|---|---|
| public abstract void setMin(int min) throws ResourcePoolException | |
| setResourceMaxAge | back to summary |
|---|---|
| public abstract void setResourceMaxAge(long millis) throws ResourcePoolException | |
| setResourceMaxIdleTime | back to summary |
|---|---|
| public abstract void setResourceMaxIdleTime(long millis) throws ResourcePoolException | |
| setStart | back to summary |
|---|---|
| public abstract void setStart(int start) throws ResourcePoolException | |