public class BlockingTaskAwareExecutorServiceImpl extends AbstractExecutorService implements BlockingTaskAwareExecutorService
BlockingRunnable. This special runnable gives hints about the code
to be running in order to avoiding put a runnable that will block the thread. In this way, only when the runnable
says that is ready, it is sent to the real executor service| Constructor and Description |
|---|
BlockingTaskAwareExecutorServiceImpl(String controllerThreadName,
ExecutorService executorService,
TimeService timeService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
checkForReadyTasks()
It checks for tasks ready to be processed in this
ExecutorService. |
void |
execute(BlockingRunnable runnable)
Executes the given command at some time in the future when the command is less probably to block a thread.
|
void |
execute(Runnable command) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic BlockingTaskAwareExecutorServiceImpl(String controllerThreadName, ExecutorService executorService, TimeService timeService)
public final void execute(BlockingRunnable runnable)
BlockingTaskAwareExecutorServiceexecute in interface BlockingTaskAwareExecutorServicerunnable - the command to executepublic void shutdown()
shutdown in interface ExecutorServicepublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServicepublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionpublic final void checkForReadyTasks()
BlockingTaskAwareExecutorServiceExecutorService.
The invocation is done asynchronously, so the invoker is never blocked.checkForReadyTasks in interface BlockingTaskAwareExecutorServiceCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.