|
JBoss Modular Service Kernel API 1.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.msc.services.ThreadPoolExecutorService
public final class ThreadPoolExecutorService

A thread pool executor service, which is configurable at runtime.
| Field Summary | |
|---|---|
static ServiceName |
JBOSS_THREADS
The service name under which thread-related services are registered. |
static ServiceName |
JBOSS_THREADS_EXECUTOR
The service name under which executors (thread pools) are registered. |
| Fields inherited from interface org.jboss.msc.service.Service |
|---|
NULL, NULL_VALUE |
| Constructor Summary | |
|---|---|
ThreadPoolExecutorService()
Construct a new instance. |
|
| Method Summary | |
|---|---|
int |
getCorePoolSize()
Get the configured core pool size. |
RejectedExecutionHandler |
getHandler()
Get the rejected execution handler. |
long |
getKeepAliveTime(TimeUnit unit)
Get the keep-alive time. |
int |
getMaximumPoolSize()
Get the configured maximum pool size. |
ThreadFactory |
getThreadFactory()
Get the configured thread factory. |
ExecutorService |
getValue()
Get the public executor service for this thread pool. |
boolean |
isAllowCoreTimeout()
Determine whether core threads are allowed to time out. |
void |
setAllowCoreTimeout(boolean allowCoreTimeout)
Specify whether core threads are allowed to time out. |
void |
setCorePoolSize(int corePoolSize)
Set the configured core pool size. |
void |
setHandler(RejectedExecutionHandler handler)
Set the rejected execution handler. |
void |
setKeepAliveTime(long keepAliveTime,
TimeUnit unit)
Set the keep-alive time. |
void |
setMaximumPoolSize(int maximumPoolSize)
Set the configured maximum pool size. |
void |
setThreadFactory(ThreadFactory threadFactory)
Set the configured thread factory. |
void |
setWorkQueue(BlockingQueue<Runnable> workQueue)
Set the configured work queue. |
void |
start(StartContext context)
Start the service. |
void |
stop(StopContext context)
Stop the service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ServiceName JBOSS_THREADS
public static ServiceName JBOSS_THREADS_EXECUTOR
| Constructor Detail |
|---|
public ThreadPoolExecutorService()
| Method Detail |
|---|
public boolean isAllowCoreTimeout()
true if core threads are allowed to time outpublic void setAllowCoreTimeout(boolean allowCoreTimeout)
allowCoreTimeout - true if core threads are allowed to time outpublic int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
corePoolSize - the core pool sizepublic int getMaximumPoolSize()
public void setMaximumPoolSize(int maximumPoolSize)
maximumPoolSize - the maximum pool sizepublic long getKeepAliveTime(TimeUnit unit)
unit - the units to use
public void setKeepAliveTime(long keepAliveTime,
TimeUnit unit)
keepAliveTime - the keep-alive timeunit - the time unitpublic void setWorkQueue(BlockingQueue<Runnable> workQueue)
workQueue - the work queuepublic ThreadFactory getThreadFactory()
public void setThreadFactory(ThreadFactory threadFactory)
threadFactory - the thread factorypublic RejectedExecutionHandler getHandler()
public void setHandler(RejectedExecutionHandler handler)
handler - the rejected execution handler
public ExecutorService getValue()
throws IllegalStateException
getValue in interface Value<ExecutorService>IllegalStateException - if the service is not started
public void start(StartContext context)
throws StartException
start in interface Service<ExecutorService>context - the context which can be used to trigger an asynchronous service start
StartException - if the service could not be started for some reasonpublic void stop(StopContext context)
stop in interface Service<ExecutorService>context - the context which can be used to trigger an asynchronous service stop
|
JBoss Modular Service Kernel API 1.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||