|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.pool.ThreadPool
public class ThreadPool
| Nested Class Summary | |
|---|---|
static class |
ThreadPool.PoolStatsImpl
|
| Field Summary | |
|---|---|
static GBeanInfo |
GBEAN_INFO
|
| Constructor Summary | |
|---|---|
ThreadPool(int minPoolSize,
int maxPoolSize,
String poolName,
long keepAliveTime,
ClassLoader classLoader,
String objectName)
|
|
| Method Summary | |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
|
void |
doFail()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
void |
execute(Runnable command)
|
void |
execute(String consumerName,
Runnable runnable)
Executes work on behalf of a named client. |
int |
getActiveCount()
|
static GBeanInfo |
getGBeanInfo()
|
int |
getMaximumPoolSize()
Gets the maximum number of threads allowed for this thread pool |
String |
getName()
Gets a human-readable name identifying this object. |
String |
getObjectName()
Gets the unique name of this object. |
int |
getPoolSize()
|
Stats |
getStats()
Gets the statistics collected for this class. |
boolean |
isEventProvider()
Determines if this object implemnts the event provider type defined in the J2EE Management specification. |
boolean |
isStateManageable()
Determines if this object implements the state manageable type defined in the J2EE Management specification. |
boolean |
isStatisticsProvider()
Determines if this object implemnts the statistics provider type defined in the J2EE Management specification. |
boolean |
isWaitWhenBlocked()
|
void |
resetStats()
Reset all statistics in PoolStatsImpl object |
void |
setWaitWhenBlocked(boolean wait)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final GBeanInfo GBEAN_INFO
| Constructor Detail |
|---|
public ThreadPool(int minPoolSize,
int maxPoolSize,
String poolName,
long keepAliveTime,
ClassLoader classLoader,
String objectName)
| Method Detail |
|---|
public String getName()
GeronimoExecutor
getName in interface GeronimoExecutorpublic String getObjectName()
J2EEManagedObject
getObjectName in interface J2EEManagedObjectgetObjectName in interface GeronimoExecutorpublic boolean isEventProvider()
J2EEManagedObject
isEventProvider in interface J2EEManagedObjectpublic boolean isStateManageable()
J2EEManagedObject
isStateManageable in interface J2EEManagedObjectpublic boolean isStatisticsProvider()
J2EEManagedObject
isStatisticsProvider in interface J2EEManagedObjectpublic Stats getStats()
StatisticsProvider
getStats in interface StatisticsProviderpublic void resetStats()
resetStats in interface StatisticsProviderpublic int getPoolSize()
getPoolSize in interface ThreadPoolpublic int getMaximumPoolSize()
ThreadPool
getMaximumPoolSize in interface ThreadPoolpublic int getActiveCount()
getActiveCount in interface ThreadPool
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ThreadPoolInterruptedExceptionpublic void execute(Runnable command)
execute in interface Executor
public void execute(String consumerName,
Runnable runnable)
ThreadPool
execute in interface ThreadPoolconsumerName - A name identifying the caller, to be used in
the management statistics for this pool, etc.runnable - The work to be done by a thread in the poolpublic void setWaitWhenBlocked(boolean wait)
public boolean isWaitWhenBlocked()
public void doStart()
throws Exception
GBeanLifecycle
doStart in interface GBeanLifecycleException - if the target failed to start; this will cause a transition to the failed state
public void doStop()
throws Exception
GBeanLifecycle
doStop in interface GBeanLifecycleException - if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail in interface GBeanLifecyclepublic static GBeanInfo getGBeanInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||