Class JBossThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.jboss.threads.JBossThreadPoolExecutor
- All Implemented Interfaces:
Executor, ExecutorService, BlockingExecutor, BlockingExecutorService, BoundedQueueThreadPoolExecutorMBean, BoundedThreadPoolExecutorMBean, ThreadExecutorMBean, ThreadPoolExecutorMBean, ShutdownListenable
@Deprecated
public final class JBossThreadPoolExecutor
extends ThreadPoolExecutor
implements BlockingExecutorService, BoundedQueueThreadPoolExecutorMBean, ShutdownListenable
Deprecated.
-
Nested Class Summary
Nested classes/interfaces inherited from class ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
ConstructorsConstructorDescriptionJBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) Deprecated.JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) Deprecated.JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) Deprecated.JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) Deprecated. -
Method Summary
Modifier and TypeMethodDescription<A> voidaddShutdownListener(EventListener<A> shutdownListener, A attachment) Deprecated.Add a shutdown listener.voidDeprecated.Executes the given command at some time in the future.voidexecuteBlocking(Runnable task) Deprecated.Execute a task, blocking until it can be accepted, or until the calling thread is interrupted.voidexecuteBlocking(Runnable task, long timeout, TimeUnit unit) Deprecated.Execute a task, blocking until it can be accepted, a timeout elapses, or the calling thread is interrupted.voidexecuteNonBlocking(Runnable task) Deprecated.Execute a task, without blocking.intDeprecated.intDeprecated.longDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.Deprecated.booleanDeprecated.booleanDeprecated.voidsetAllowCoreThreadTimeout(boolean allow) Deprecated.voidsetBlocking(boolean blocking) Deprecated.voidsetCoreThreads(int newSize) Deprecated.voidsetKeepAliveTime(long milliseconds) Deprecated.voidsetMaxThreads(int newSize) Deprecated.voidDeprecated.protected voidDeprecated.Methods inherited from class ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setThreadFactory, shutdown, shutdownNow, toStringMethods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Constructor Details
-
JBossThreadPoolExecutor
public JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) Deprecated. -
JBossThreadPoolExecutor
public JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) Deprecated. -
JBossThreadPoolExecutor
public JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) Deprecated. -
JBossThreadPoolExecutor
public JBossThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) Deprecated.
-
-
Method Details
-
execute
Deprecated.Description copied from interface:BlockingExecutorExecutes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the Executor implementation. The call may block or not block, depending on the configuration of the executor.- Specified by:
executein interfaceBlockingExecutor- Specified by:
executein interfaceExecutor- Overrides:
executein classThreadPoolExecutor- Parameters:
task- the task to submit
-
executeBlocking
Deprecated.Description copied from interface:BlockingExecutorExecute a task, blocking until it can be accepted, or until the calling thread is interrupted.- Specified by:
executeBlockingin interfaceBlockingExecutor- Parameters:
task- the task to submit- Throws:
RejectedExecutionException- if execution is rejected for some other reasonInterruptedException- if the current thread was interrupted before the task could be accepted
-
executeBlocking
public void executeBlocking(Runnable task, long timeout, TimeUnit unit) throws RejectedExecutionException, InterruptedException Deprecated.Description copied from interface:BlockingExecutorExecute a task, blocking until it can be accepted, a timeout elapses, or the calling thread is interrupted.- Specified by:
executeBlockingin interfaceBlockingExecutor- Parameters:
task- the task to submittimeout- the amount of time to waitunit- the unit of time- Throws:
RejectedExecutionException- if execution is rejected for some other reasonInterruptedException- if the current thread was interrupted before the task could be accepted
-
executeNonBlocking
Deprecated.Description copied from interface:BlockingExecutorExecute a task, without blocking.- Specified by:
executeNonBlockingin interfaceBlockingExecutor- Parameters:
task- the task to submit- Throws:
RejectedExecutionException- if execution is rejected for some other reason
-
getLargestThreadCount
public int getLargestThreadCount()Deprecated.- Specified by:
getLargestThreadCountin interfaceThreadExecutorMBean
-
isAllowCoreThreadTimeout
public boolean isAllowCoreThreadTimeout()Deprecated.- Specified by:
isAllowCoreThreadTimeoutin interfaceBoundedQueueThreadPoolExecutorMBean
-
setAllowCoreThreadTimeout
public void setAllowCoreThreadTimeout(boolean allow) Deprecated.- Specified by:
setAllowCoreThreadTimeoutin interfaceBoundedQueueThreadPoolExecutorMBean
-
getMaxThreads
public int getMaxThreads()Deprecated.- Specified by:
getMaxThreadsin interfaceThreadPoolExecutorMBean
-
setMaxThreads
public void setMaxThreads(int newSize) Deprecated.- Specified by:
setMaxThreadsin interfaceThreadPoolExecutorMBean
-
getCoreThreads
public int getCoreThreads()Deprecated.- Specified by:
getCoreThreadsin interfaceBoundedQueueThreadPoolExecutorMBean
-
setCoreThreads
public void setCoreThreads(int newSize) Deprecated.- Specified by:
setCoreThreadsin interfaceBoundedQueueThreadPoolExecutorMBean
-
getKeepAliveTime
public long getKeepAliveTime()Deprecated.- Specified by:
getKeepAliveTimein interfaceThreadPoolExecutorMBean
-
setKeepAliveTime
public void setKeepAliveTime(long milliseconds) Deprecated.- Specified by:
setKeepAliveTimein interfaceThreadPoolExecutorMBean
-
getCurrentThreadCount
public int getCurrentThreadCount()Deprecated.- Specified by:
getCurrentThreadCountin interfaceThreadExecutorMBean
-
getRejectedCount
public int getRejectedCount()Deprecated.- Specified by:
getRejectedCountin interfaceThreadExecutorMBean
-
getQueueSize
-
isBlocking
public boolean isBlocking()Deprecated.- Specified by:
isBlockingin interfaceBoundedThreadPoolExecutorMBean
-
setBlocking
public void setBlocking(boolean blocking) Deprecated.- Specified by:
setBlockingin interfaceBoundedThreadPoolExecutorMBean
-
getRejectedExecutionHandler
Deprecated.- Overrides:
getRejectedExecutionHandlerin classThreadPoolExecutor
-
setRejectedExecutionHandler
Deprecated.- Overrides:
setRejectedExecutionHandlerin classThreadPoolExecutor
-
addShutdownListener
Deprecated.Add a shutdown listener. If the target object is already shut down, the listener is invoked directly.- Specified by:
addShutdownListenerin interfaceShutdownListenable- Type Parameters:
A- the attachment type- Parameters:
shutdownListener- the listenerattachment- the attachment value to pass to the listener
-
terminated
-
EnhancedQueueExecutorinstead.