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
Modifier and TypeMethodDescriptionvoidDiscard an object.get()Get an object from the pool.intintintintintvoidRelease the object from use.voidsetMaxSize(int maxSize) voidstart()Start the pool.voidstop()Stop the pool.
-
Method Details
-
discard
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
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.
-