Class QueuelessExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
org.jboss.threads.QueuelessExecutor
- All Implemented Interfaces:
Executor, ExecutorService, BlockingExecutor, BlockingExecutorService, BoundedThreadPoolExecutorMBean, ThreadExecutorMBean, ThreadPoolExecutorMBean, ShutdownListenable
@Deprecated
public final class QueuelessExecutor
extends AbstractExecutorService
implements BlockingExecutorService, BoundedThreadPoolExecutorMBean, ShutdownListenable
Deprecated.
A queueless thread pool. If one or more threads are waiting for work when a task is submitted, it will be used.
Otherwise, if fewer than the maximum threads are started, a new thread is created.
-
Constructor Summary
ConstructorsConstructorDescriptionQueuelessExecutor(ThreadFactory threadFactory, DirectExecutor taskExecutor, Executor handoffExecutor, long keepAliveTime) Deprecated. -
Method Summary
Modifier and TypeMethodDescription<A> voidaddShutdownListener(EventListener<A> shutdownListener, A attachment) Deprecated.Add a shutdown listener.booleanawaitTermination(long timeout, TimeUnit unit) Deprecated.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.Deprecated.longDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.voidsetBlocking(boolean blocking) Deprecated.voidsetHandoffExecutor(Executor handoffExecutor) Deprecated.voidsetKeepAliveTime(long milliseconds) Deprecated.voidsetMaxThreads(int newSize) Deprecated.voidshutdown()Deprecated.Deprecated.Methods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
Constructor Details
-
QueuelessExecutor
public QueuelessExecutor(ThreadFactory threadFactory, DirectExecutor taskExecutor, Executor handoffExecutor, long keepAliveTime) Deprecated.
-
-
Method Details
-
getMaxThreads
public int getMaxThreads()Deprecated.- Specified by:
getMaxThreadsin interfaceThreadPoolExecutorMBean
-
setMaxThreads
public void setMaxThreads(int newSize) Deprecated.- Specified by:
setMaxThreadsin interfaceThreadPoolExecutorMBean
-
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
-
getLargestThreadCount
public int getLargestThreadCount()Deprecated.- Specified by:
getLargestThreadCountin 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
-
getHandoffExecutor
Deprecated. -
setHandoffExecutor
Deprecated. -
shutdown
-
awaitTermination
Deprecated.- Specified by:
awaitTerminationin interfaceExecutorService- Throws:
InterruptedException
-
shutdownNow
Deprecated.- Specified by:
shutdownNowin interfaceExecutorService
-
isShutdown
-
isTerminated
-
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- 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
-
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
-
EnhancedQueueExecutorinstead.