Package org.jboss.as.threads
Class UnboundedQueueThreadPoolService
- java.lang.Object
-
- org.jboss.as.threads.UnboundedQueueThreadPoolService
-
- All Implemented Interfaces:
org.jboss.msc.Service
,org.jboss.msc.service.Service<ManagedJBossThreadPoolExecutorService>
,org.jboss.msc.value.Value<ManagedJBossThreadPoolExecutorService>
public class UnboundedQueueThreadPoolService extends Object implements org.jboss.msc.service.Service<ManagedJBossThreadPoolExecutorService>
Service responsible for creating, starting and stopping a thread pool executor with an unbounded queue.- Author:
- John E. Bailey
-
-
Constructor Summary
Constructors Constructor Description UnboundedQueueThreadPoolService(boolean allowCoreThreadTimeout, int maxThreads, TimeSpec keepAlive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getActiveCount()
long
getCompletedTaskCount()
int
getCurrentThreadCount()
int
getLargestPoolSize()
int
getLargestThreadCount()
int
getQueueSize()
int
getRejectedCount()
long
getTaskCount()
org.jboss.msc.inject.Injector<ThreadFactory>
getThreadFactoryInjector()
ManagedJBossThreadPoolExecutorService
getValue()
void
setKeepAlive(TimeSpec keepAlive)
void
setMaxThreads(int maxThreads)
void
start(org.jboss.msc.service.StartContext context)
void
stop(org.jboss.msc.service.StopContext context)
-
-
-
Constructor Detail
-
UnboundedQueueThreadPoolService
public UnboundedQueueThreadPoolService(boolean allowCoreThreadTimeout, int maxThreads, TimeSpec keepAlive)
-
-
Method Detail
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
- Specified by:
start
in interfaceorg.jboss.msc.Service
- Specified by:
start
in interfaceorg.jboss.msc.service.Service<ManagedJBossThreadPoolExecutorService>
- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
- Specified by:
stop
in interfaceorg.jboss.msc.service.Service<ManagedJBossThreadPoolExecutorService>
-
getValue
public ManagedJBossThreadPoolExecutorService getValue() throws IllegalStateException
- Specified by:
getValue
in interfaceorg.jboss.msc.value.Value<ManagedJBossThreadPoolExecutorService>
- Throws:
IllegalStateException
-
getThreadFactoryInjector
public org.jboss.msc.inject.Injector<ThreadFactory> getThreadFactoryInjector()
-
setMaxThreads
public void setMaxThreads(int maxThreads)
-
setKeepAlive
public void setKeepAlive(TimeSpec keepAlive)
-
getActiveCount
public int getActiveCount()
-
getCompletedTaskCount
public long getCompletedTaskCount()
-
getCurrentThreadCount
public int getCurrentThreadCount()
-
getLargestPoolSize
public int getLargestPoolSize()
-
getLargestThreadCount
public int getLargestThreadCount()
-
getRejectedCount
public int getRejectedCount()
-
getTaskCount
public long getTaskCount()
-
getQueueSize
public int getQueueSize()
-
-