Package org.jboss.as.ejb3.pool.strictmax
Class StrictMaxPool<T>
java.lang.Object
org.jboss.as.ejb3.pool.AbstractPool<T>
org.jboss.as.ejb3.pool.strictmax.StrictMaxPool<T>
- All Implemented Interfaces:
Pool<T>
A pool with a maximum size.
- Author:
- Carlo de Wolf, Kabir Khan
-
Constructor Summary
ConstructorsConstructorDescriptionStrictMaxPool(StatelessObjectFactory<T> factory, int maxSize, long timeout, TimeUnit timeUnit) -
Method Summary
Modifier and TypeMethodDescriptionvoidDiscard an object.get()Get an instance without identity.intintintvoidReturn an instance after invocation.voidDeprecated.voidsetMaxSize(int maxSize) voidstart()Start the pool.voidstop()Stop the pool.Methods inherited from class org.jboss.as.ejb3.pool.AbstractPool
create, destroy, doRemove, getCreateCount, getRemoveCount
-
Constructor Details
-
StrictMaxPool
public StrictMaxPool(StatelessObjectFactory<T> factory, int maxSize, long timeout, TimeUnit timeUnit)
-
-
Method Details
-
discard
Description copied from interface:PoolDiscard an object. This will be called in case of a system exception.- Parameters:
ctx- the object
-
getCurrentSize
public int getCurrentSize() -
getAvailableCount
public int getAvailableCount() -
getMaxSize
public int getMaxSize() -
setMaxSize
public void setMaxSize(int maxSize) - Specified by:
setMaxSizein interfacePool<T>- Specified by:
setMaxSizein classAbstractPool<T>
-
get
Get an instance without identity. Can be used by finders,create-methods, and activation- Returns:
- Context /w instance
-
release
Return an instance after invocation. Called in 2 cases: a) Done with finder method b) Just removed- Parameters:
obj-
-
remove
Deprecated.- Overrides:
removein classAbstractPool<T>
-
start
public void start()Description copied from interface:PoolStart the pool. -
stop
public void stop()Description copied from interface:PoolStop the pool.
-