|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb3.pool.ThreadlocalPool
public class ThreadlocalPool
Pools EJBs within a ThreadLocal.
Field Summary | |
---|---|
protected WeakThreadLocal<BeanContext> |
currentBeanContext
|
protected Pool |
pool
|
Constructor Summary | |
---|---|
ThreadlocalPool()
|
Method Summary | |
---|---|
protected BeanContext |
create()
|
protected BeanContext |
create(Class[] initTypes,
Object[] initValues)
|
void |
destroy()
Destroy the pool. |
void |
discard(BeanContext obj)
Discard the bean. |
BeanContext |
get()
Creates if no object is available in pool. |
BeanContext |
get(Class[] initTypes,
Object[] initValues)
|
int |
getAvailableCount()
|
int |
getCreateCount()
|
int |
getCurrentSize()
|
int |
getMaxSize()
|
int |
getRemoveCount()
|
void |
initialize(Container container,
int maxSize,
long timeout)
|
void |
release(BeanContext ctx)
Put bean back in pool |
void |
remove(BeanContext ctx)
Destroy bean. |
void |
setInjectors(Injector[] injectors)
|
void |
setMaxSize(int maxSize)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Pool pool
protected WeakThreadLocal<BeanContext> currentBeanContext
Constructor Detail |
---|
public ThreadlocalPool()
Method Detail |
---|
protected BeanContext create()
protected BeanContext create(Class[] initTypes, Object[] initValues)
public void discard(BeanContext obj)
Pool
discard
in interface Pool
public void destroy()
Pool
destroy
in interface Pool
public BeanContext get()
Pool
get
in interface Pool
public BeanContext get(Class[] initTypes, Object[] initValues)
get
in interface Pool
public void initialize(Container container, int maxSize, long timeout)
initialize
in interface Pool
public void release(BeanContext ctx)
Pool
release
in interface Pool
public void remove(BeanContext ctx)
Pool
remove
in interface Pool
public int getCurrentSize()
getCurrentSize
in interface Pool
public int getAvailableCount()
getAvailableCount
in interface Pool
public int getCreateCount()
getCreateCount
in interface Pool
public int getMaxSize()
getMaxSize
in interface Pool
public int getRemoveCount()
getRemoveCount
in interface Pool
public void setInjectors(Injector[] injectors)
setInjectors
in interface Pool
public void setMaxSize(int maxSize)
setMaxSize
in interface Pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |