Package org.infinispan.util.concurrent
Interface BlockingManager.BlockingExecutor
- Enclosing interface:
- BlockingManager
public static interface BlockingManager.BlockingExecutor
Executor interface that submits task to a blocking pool that returns a stage that is guaranteed
 to run any chained stages on a non-blocking thread if the stage is not yet complete.
 
Note that this executor runs the task in the invoking thread if the thread is a blocking thread.
- 
Method SummaryModifier and TypeMethodDescriptionExecutes the given runnable on the blocking executor.<V> CompletionStage<V> Executes the given supplier on the blocking executor.
- 
Method Details- 
executeExecutes the given runnable on the blocking executor. The traceId is printed in the invoking thread, in the blocking thread, and also during resumption of the non-blocking thread.- Parameters:
- runnable- blocking operation that runs some code.
- traceId- an identifier that can be used to tell in a trace when an operation moves between threads.
- Returns:
- a stage that is completed after the runnable is done or throws an exception.
 
- 
supplyExecutes the given supplier on the blocking executor. The traceId is printed in the invoking thread, in the blocking thread, and also during resumption of the non-blocking thread.- Type Parameters:
- V- supplier type.
- Parameters:
- supplier- blocking operation that returns a value.
- traceId- an identifier that can be used to tell in a trace when an operation moves between threads.
- Returns:
- a stage that, when complete, contains the value returned from the supplier or a throwable.
 
 
-