|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 GeronimoExecutor
public String getObjectName()
J2EEManagedObject
getObjectName
in interface J2EEManagedObject
getObjectName
in interface GeronimoExecutor
public boolean isEventProvider()
J2EEManagedObject
isEventProvider
in interface J2EEManagedObject
public boolean isStateManageable()
J2EEManagedObject
isStateManageable
in interface J2EEManagedObject
public boolean isStatisticsProvider()
J2EEManagedObject
isStatisticsProvider
in interface J2EEManagedObject
public Stats getStats()
StatisticsProvider
getStats
in interface StatisticsProvider
public void resetStats()
resetStats
in interface StatisticsProvider
public int getPoolSize()
getPoolSize
in interface ThreadPool
public int getMaximumPoolSize()
ThreadPool
getMaximumPoolSize
in interface ThreadPool
public int getActiveCount()
getActiveCount
in interface ThreadPool
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ThreadPool
InterruptedException
public void execute(Runnable command)
execute
in interface Executor
public void execute(String consumerName, Runnable runnable)
ThreadPool
execute
in interface ThreadPool
consumerName
- 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 GBeanLifecycle
Exception
- if the target failed to start; this will cause a transition to the failed statepublic void doStop() throws Exception
GBeanLifecycle
doStop
in interface GBeanLifecycle
Exception
- if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail
in interface GBeanLifecycle
public static GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |