public final class JBossScheduledThreadPoolExecutor extends java.util.concurrent.ScheduledThreadPoolExecutor implements ThreadPoolExecutorMBean, ShutdownListenable
| Modifier and Type | Class and Description |
|---|---|
private class |
JBossScheduledThreadPoolExecutor.CountingRejectHandler |
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicInteger |
rejectCount |
private SimpleShutdownListenable |
shutdownListenable |
| Constructor and Description |
|---|
JBossScheduledThreadPoolExecutor(int corePoolSize) |
JBossScheduledThreadPoolExecutor(int corePoolSize,
java.util.concurrent.RejectedExecutionHandler handler) |
JBossScheduledThreadPoolExecutor(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory) |
JBossScheduledThreadPoolExecutor(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory,
java.util.concurrent.RejectedExecutionHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
<A> void |
addShutdownListener(EventListener<A> shutdownListener,
A attachment)
Add a shutdown listener.
|
int |
getCurrentThreadCount() |
long |
getKeepAliveTime() |
int |
getLargestThreadCount() |
int |
getMaxThreads() |
int |
getQueueSize() |
int |
getRejectedCount() |
java.util.concurrent.RejectedExecutionHandler |
getRejectedExecutionHandler() |
void |
setKeepAliveTime(long milliseconds) |
void |
setKeepAliveTime(long time,
java.util.concurrent.TimeUnit unit) |
void |
setMaxThreads(int newSize) |
void |
setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler handler) |
protected void |
terminated() |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitafterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setMaximumPoolSize, setThreadFactory, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForprivate final SimpleShutdownListenable shutdownListenable
private final java.util.concurrent.atomic.AtomicInteger rejectCount
public JBossScheduledThreadPoolExecutor(int corePoolSize)
public JBossScheduledThreadPoolExecutor(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory)
public JBossScheduledThreadPoolExecutor(int corePoolSize,
java.util.concurrent.RejectedExecutionHandler handler)
public JBossScheduledThreadPoolExecutor(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory,
java.util.concurrent.RejectedExecutionHandler handler)
public long getKeepAliveTime()
getKeepAliveTime in interface ThreadPoolExecutorMBeanpublic void setKeepAliveTime(long milliseconds)
setKeepAliveTime in interface ThreadPoolExecutorMBeanpublic void setKeepAliveTime(long time,
java.util.concurrent.TimeUnit unit)
setKeepAliveTime in class java.util.concurrent.ThreadPoolExecutorpublic int getRejectedCount()
getRejectedCount in interface ThreadExecutorMBeanpublic int getCurrentThreadCount()
getCurrentThreadCount in interface ThreadExecutorMBeanpublic int getLargestThreadCount()
getLargestThreadCount in interface ThreadExecutorMBeanpublic int getMaxThreads()
getMaxThreads in interface ThreadPoolExecutorMBeanpublic void setMaxThreads(int newSize)
setMaxThreads in interface ThreadPoolExecutorMBeanpublic java.util.concurrent.RejectedExecutionHandler getRejectedExecutionHandler()
getRejectedExecutionHandler in class java.util.concurrent.ThreadPoolExecutorpublic void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler handler)
setRejectedExecutionHandler in class java.util.concurrent.ThreadPoolExecutorpublic int getQueueSize()
getQueueSize in interface ThreadExecutorMBeanpublic <A> void addShutdownListener(EventListener<A> shutdownListener, A attachment)
addShutdownListener in interface ShutdownListenableA - the attachment typeshutdownListener - the listenerattachment - the attachment value to pass to the listenerprotected void terminated()
terminated in class java.util.concurrent.ThreadPoolExecutor