|
QuickServer v1.4.5 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.quickserver.util.pool.thread.ClientPool
This is a class for managing the pool of threads for handling clients.
Field Summary | |
protected java.util.List |
clients
|
protected org.apache.commons.pool.ObjectPool |
pool
|
protected PoolConfig |
poolConfig
|
Constructor Summary | |
ClientPool(org.apache.commons.pool.ObjectPool objectPool,
PoolConfig poolConfig)
|
Method Summary | |
void |
addClient(java.lang.Runnable r)
|
void |
clear()
|
void |
close()
|
protected void |
finalize()
|
java.util.Iterator |
getAllClientThread()
Returns iterator containing all the active threads i.e ClientHandler handling connected clients. |
java.lang.Runnable |
getClient()
|
int |
getNumActive()
Return the number of instances currently borrowed from my pool. |
int |
getNumIdle()
Return the number of instances currently idle in my pool. |
PoolConfig |
getPoolConfig()
Returns PoolConfig object that configured this pool |
boolean |
isClientAvailable()
|
void |
returnObject(java.lang.Object object)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List clients
protected org.apache.commons.pool.ObjectPool pool
protected PoolConfig poolConfig
Constructor Detail |
public ClientPool(org.apache.commons.pool.ObjectPool objectPool, PoolConfig poolConfig)
Method Detail |
public void addClient(java.lang.Runnable r) throws java.util.NoSuchElementException
java.util.NoSuchElementException
public void returnObject(java.lang.Object object)
public java.lang.Runnable getClient()
public boolean isClientAvailable()
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public void close() throws java.lang.Exception
java.lang.Exception
public void clear() throws java.lang.Exception
java.lang.Exception
public int getNumActive()
public int getNumIdle()
public final java.util.Iterator getAllClientThread()
public PoolConfig getPoolConfig()
|
QuickServer v1.4.5 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |