Package org.infinispan.util.concurrent
Interface BlockingTaskAwareExecutorService
-
- All Superinterfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
- All Known Implementing Classes:
BlockingTaskAwareExecutorServiceImpl
,LazyInitializingBlockingTaskAwareExecutorService
public interface BlockingTaskAwareExecutorService extends java.util.concurrent.ExecutorService
Executor service that is aware ofBlockingRunnable
and only dispatch the runnable to a thread when it has low (or no) probability of blocking the thread. However, it is not aware of the changes in the state so you must invokecheckForReadyTasks()
to notify this that some runnable may be ready to be processed.- Since:
- 5.3
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkForReadyTasks()
It checks for tasks ready to be processed in thisExecutorService
.void
execute(BlockingRunnable runnable)
Executes the given command at some time in the future when the command is less probably to block a thread.
-
-
-
Method Detail
-
execute
void execute(BlockingRunnable runnable)
Executes the given command at some time in the future when the command is less probably to block a thread.- Parameters:
runnable
- the command to execute
-
checkForReadyTasks
void checkForReadyTasks()
It checks for tasks ready to be processed in thisExecutorService
. The invocation is done asynchronously, so the invoker is never blocked.
-
-