Package org.jboss.as.ejb3.pool
Interface Pool<T>
-
- All Known Implementing Classes:
AbstractPool,StrictMaxPool
public interface Pool<T>A pool of stateless objects. A pool is linked to an object factory. How this link is established is left beyond scope.- Version:
- $Revision: $
- Author:
- Carlo de Wolf
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddiscard(T obj)Discard an object.Tget()Get an object from the pool.intgetAvailableCount()intgetCreateCount()intgetCurrentSize()intgetMaxSize()intgetRemoveCount()voidrelease(T obj)Release the object from use.voidsetMaxSize(int maxSize)voidstart()Start the pool.voidstop()Stop the pool.
-
-
-
Method Detail
-
discard
void discard(T obj)
Discard an object. This will be called in case of a system exception.- Parameters:
obj- the object
-
get
T get()
Get an object from the pool. This will mark the object as being in use.- Returns:
- the object
-
getAvailableCount
int getAvailableCount()
-
getCreateCount
int getCreateCount()
-
getCurrentSize
int getCurrentSize()
-
getMaxSize
int getMaxSize()
-
getRemoveCount
int getRemoveCount()
-
release
void release(T obj)
Release the object from use.- Parameters:
obj- the object
-
setMaxSize
void setMaxSize(int maxSize)
-
start
void start()
Start the pool.
-
stop
void stop()
Stop the pool.
-
-