public final class JBossScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor implements ThreadPoolExecutorMBean, ShutdownListenable
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
JBossScheduledThreadPoolExecutor(int corePoolSize) |
JBossScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler) |
JBossScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory) |
JBossScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
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 |
getRejectedCount() |
RejectedExecutionHandler |
getRejectedExecutionHandler() |
void |
setKeepAliveTime(long milliseconds) |
void |
setKeepAliveTime(long time,
TimeUnit unit) |
void |
setMaxThreads(int newSize) |
void |
setRejectedExecutionHandler(RejectedExecutionHandler handler) |
protected void |
terminated() |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setMaximumPoolSize, setThreadFactory, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
public JBossScheduledThreadPoolExecutor(int corePoolSize)
public JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
public JBossScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)
public JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
public long getKeepAliveTime()
getKeepAliveTime
in interface ThreadPoolExecutorMBean
public void setKeepAliveTime(long milliseconds)
setKeepAliveTime
in interface ThreadPoolExecutorMBean
public void setKeepAliveTime(long time, TimeUnit unit)
setKeepAliveTime
in class ThreadPoolExecutor
public int getRejectedCount()
getRejectedCount
in interface ThreadExecutorMBean
public int getCurrentThreadCount()
getCurrentThreadCount
in interface ThreadExecutorMBean
public int getLargestThreadCount()
getLargestThreadCount
in interface ThreadExecutorMBean
public int getMaxThreads()
getMaxThreads
in interface ThreadPoolExecutorMBean
public void setMaxThreads(int newSize)
setMaxThreads
in interface ThreadPoolExecutorMBean
public RejectedExecutionHandler getRejectedExecutionHandler()
getRejectedExecutionHandler
in class ThreadPoolExecutor
public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
setRejectedExecutionHandler
in class ThreadPoolExecutor
public <A> void addShutdownListener(EventListener<A> shutdownListener, A attachment)
addShutdownListener
in interface ShutdownListenable
A
- the attachment typeshutdownListener
- the listenerattachment
- the attachment value to pass to the listenerprotected void terminated()
terminated
in class ThreadPoolExecutor
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.