com.sun.ejb.containers.util.pool
Class BoundedPool
java.lang.Object
com.sun.ejb.containers.util.pool.AbstractPool
com.sun.ejb.containers.util.pool.BoundedPool
- All Implemented Interfaces:
- Pool, EJBPoolStatsProvider, StatsProvider
public class BoundedPool
- extends AbstractPool
Abstract pool provides the basic implementation of an object pool.
The implementation uses a linked list to maintain a list of (available)
objects. If the pool is empty it simply creates one using the
ObjectFactory instance. Subclasses can change this behaviour by overriding
getObject(...) and returnObject(....) methods. This class provides basic
support for synchronization, event notification, pool shutdown and pool
object recycling. It also does some very basic bookkeeping like the
number of objects created, number of threads waiting for object.
Subclasses can make use of these book-keeping data to provide complex
pooling mechanism like LRU / MRU / Random. Also, note that AbstractPool
does not have a notion of pool limit. It is upto to the derived classes
to implement these features.
| Fields inherited from class com.sun.ejb.containers.util.pool.AbstractPool |
_logger, appName, beanId, configData, containerClassLoader, createdCount, destroyedCount, ejbName, factory, idleTimeoutInSeconds, list, maxPoolSize, maxWaitTimeInMillis, modName, poolName, poolProbeNotifier, poolReturned, poolSuccess, resizeQuantity, steadyPoolSize, waitCount |
|
Constructor Summary |
BoundedPool(ObjectFactory factory,
long beanId,
int steadyPoolSize,
int resizeQuantity,
int maxPoolsize,
long maxWaitTimeInMillis,
int idleTimeoutInSeconds,
java.lang.ClassLoader loader)
|
| Methods inherited from class com.sun.ejb.containers.util.pool.AbstractPool |
appendStats, close, destroyObject, getAllAttrValues, getAllMonitoredAttrbuteValues, getCreatedCount, getDestroyedCount, getIdleTimeoutInSeconds, getJmsMaxMessagesLoad, getMaxPoolSize, getMaxWaitTimeInMillis, getNumBeansInPool, getNumThreadsWaiting, getObject, getObject, getObject, getPoolSuccess, getResizeQuantity, getSize, getSteadyPoolSize, getTotalBeansCreated, getTotalBeansDestroyed, getWaitCount, initializePool, preload, remove, returnObject, setConfigData, setContainerClassLoader, setInfo, unregisterProbeProvider |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
previousSize
protected int previousSize
BoundedPool
public BoundedPool(ObjectFactory factory,
long beanId,
int steadyPoolSize,
int resizeQuantity,
int maxPoolsize,
long maxWaitTimeInMillis,
int idleTimeoutInSeconds,
java.lang.ClassLoader loader)
removeIdleObjects
protected void removeIdleObjects()
- Specified by:
removeIdleObjects in class AbstractPool
Copyright © 2012 GlassFish Community. All Rights Reserved.