Package org.jboss.threads
Class JBossScheduledThreadPoolExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- java.util.concurrent.ScheduledThreadPoolExecutor
-
- org.jboss.threads.JBossScheduledThreadPoolExecutor
-
- All Implemented Interfaces:
Executor,ExecutorService,ScheduledExecutorService
public final class JBossScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description JBossScheduledThreadPoolExecutor(int corePoolSize, Runnable terminationTask)JBossScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler, Runnable terminationTask)JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, Runnable terminationTask)JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler, Runnable terminationTask)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentThreadCount()longgetKeepAliveTime()intgetLargestThreadCount()intgetMaxThreads()intgetQueueSize()intgetRejectedCount()RejectedExecutionHandlergetRejectedExecutionHandler()voidsetKeepAliveTime(long milliseconds)voidsetKeepAliveTime(long time, TimeUnit unit)voidsetMaxThreads(int newSize)voidsetRejectedExecutionHandler(RejectedExecutionHandler handler)protected voidterminated()-
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
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
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
-
-
-
Constructor Detail
-
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize, Runnable terminationTask)
-
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, Runnable terminationTask)
-
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler, Runnable terminationTask)
-
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler, Runnable terminationTask)
-
-
Method Detail
-
getKeepAliveTime
public long getKeepAliveTime()
-
setKeepAliveTime
public void setKeepAliveTime(long milliseconds)
-
setKeepAliveTime
public void setKeepAliveTime(long time, TimeUnit unit)- Overrides:
setKeepAliveTimein classThreadPoolExecutor
-
getRejectedCount
public int getRejectedCount()
-
getCurrentThreadCount
public int getCurrentThreadCount()
-
getLargestThreadCount
public int getLargestThreadCount()
-
getMaxThreads
public int getMaxThreads()
-
setMaxThreads
public void setMaxThreads(int newSize)
-
getRejectedExecutionHandler
public RejectedExecutionHandler getRejectedExecutionHandler()
- Overrides:
getRejectedExecutionHandlerin classThreadPoolExecutor
-
setRejectedExecutionHandler
public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
- Overrides:
setRejectedExecutionHandlerin classThreadPoolExecutor
-
getQueueSize
public int getQueueSize()
-
terminated
protected void terminated()
- Overrides:
terminatedin classThreadPoolExecutor
-
-