org.apache.geronimo.pool
Class ThreadPool

java.lang.Object
  extended by org.apache.geronimo.pool.ThreadPool
All Implemented Interfaces:
edu.emory.mathcs.backport.java.util.concurrent.Executor, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.management.J2EEManagedObject, org.apache.geronimo.management.StatisticsProvider, GeronimoExecutor, org.apache.geronimo.system.threads.ThreadPool

public class ThreadPool
extends Object
implements GeronimoExecutor, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.management.J2EEManagedObject, org.apache.geronimo.management.StatisticsProvider


Nested Class Summary
static class ThreadPool.PoolStatsImpl
           
 
Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
ThreadPool(int poolSize, String poolName, long keepAliveTime, ClassLoader classLoader, String objectName)
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 void execute(Runnable command)
           
 void execute(String consumerName, Runnable runnable)
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getName()
          Gets a human-readable name identifying this object.
 String getObjectName()
          Gets the unique name of this object.
 int getPoolSize()
           
 Stats getStats()
           
 boolean isEventProvider()
           
 boolean isStateManageable()
           
 boolean isStatisticsProvider()
           
 boolean isWaitWhenBlocked()
           
 void setWaitWhenBlocked(boolean wait)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

ThreadPool

public ThreadPool(int poolSize,
                  String poolName,
                  long keepAliveTime,
                  ClassLoader classLoader,
                  String objectName)
Method Detail

getName

public String getName()
Description copied from interface: GeronimoExecutor
Gets a human-readable name identifying this object.

Specified by:
getName in interface GeronimoExecutor

getObjectName

public String getObjectName()
Description copied from interface: GeronimoExecutor
Gets the unique name of this object. The object name must comply with the ObjectName specification in the JMX specification.

Specified by:
getObjectName in interface org.apache.geronimo.management.J2EEManagedObject
Specified by:
getObjectName in interface GeronimoExecutor
Returns:
the unique name of this object within the server

isEventProvider

public boolean isEventProvider()
Specified by:
isEventProvider in interface org.apache.geronimo.management.J2EEManagedObject

isStateManageable

public boolean isStateManageable()
Specified by:
isStateManageable in interface org.apache.geronimo.management.J2EEManagedObject

isStatisticsProvider

public boolean isStatisticsProvider()
Specified by:
isStatisticsProvider in interface org.apache.geronimo.management.J2EEManagedObject

getStats

public Stats getStats()
Specified by:
getStats in interface org.apache.geronimo.management.StatisticsProvider

getPoolSize

public int getPoolSize()
Specified by:
getPoolSize in interface org.apache.geronimo.system.threads.ThreadPool

execute

public void execute(Runnable command)
Specified by:
execute in interface edu.emory.mathcs.backport.java.util.concurrent.Executor

execute

public void execute(String consumerName,
                    Runnable runnable)
Specified by:
execute in interface org.apache.geronimo.system.threads.ThreadPool

setWaitWhenBlocked

public void setWaitWhenBlocked(boolean wait)

isWaitWhenBlocked

public boolean isWaitWhenBlocked()

doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.