Package org.jboss.as.threads
Class ScheduledThreadPoolService
- java.lang.Object
-
- org.jboss.as.threads.ScheduledThreadPoolService
-
- All Implemented Interfaces:
org.jboss.msc.Service,org.jboss.msc.service.Service<ManagedScheduledExecutorService>,org.jboss.msc.value.Value<ManagedScheduledExecutorService>
public final class ScheduledThreadPoolService extends Object implements org.jboss.msc.service.Service<ManagedScheduledExecutorService>
Service responsible for creating, starting and stopping a scheduled thread pool executor.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description ScheduledThreadPoolService(int maxThreads, TimeSpec keepAlive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetActiveCount()longgetCompletedTaskCount()intgetCurrentThreadCount()intgetLargestThreadCount()intgetQueueSize()longgetTaskCount()org.jboss.msc.inject.Injector<ThreadFactory>getThreadFactoryInjector()ManagedScheduledExecutorServicegetValue()voidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
Constructor Detail
-
ScheduledThreadPoolService
public ScheduledThreadPoolService(int maxThreads, TimeSpec keepAlive)
-
-
Method Detail
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<ManagedScheduledExecutorService>- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<ManagedScheduledExecutorService>
-
getValue
public ManagedScheduledExecutorService getValue() throws IllegalStateException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<ManagedScheduledExecutorService>- Throws:
IllegalStateException
-
getThreadFactoryInjector
public org.jboss.msc.inject.Injector<ThreadFactory> getThreadFactoryInjector()
-
getActiveCount
public int getActiveCount()
-
getCompletedTaskCount
public long getCompletedTaskCount()
-
getCurrentThreadCount
public int getCurrentThreadCount()
-
getLargestThreadCount
public int getLargestThreadCount()
-
getTaskCount
public long getTaskCount()
-
getQueueSize
public int getQueueSize()
-
-