Class CompletionStageThreadPoolBulkhead<V>
java.lang.Object
io.smallrye.faulttolerance.core.bulkhead.BulkheadBase<CompletionStage<V>>
io.smallrye.faulttolerance.core.bulkhead.CompletionStageThreadPoolBulkhead<V>
- All Implemented Interfaces:
FaultToleranceStrategy<CompletionStage<V>>
Thread pool style bulkhead for
CompletionStage asynchronous executions.
Implements a proper queue of tasks. When a task (that was previously allowed to enter) leaves the bulkhead, it will attempt to take one task from the queue and execute it.
-
Field Summary
Fields inherited from class io.smallrye.faulttolerance.core.bulkhead.BulkheadBase
description -
Constructor Summary
ConstructorsConstructorDescriptionCompletionStageThreadPoolBulkhead(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, int size, int queueSize) -
Method Summary
Modifier and TypeMethodDescriptionapply(InvocationContext<CompletionStage<V>> ctx) Apply the fault tolerance strategy around the targetCallable.
-
Constructor Details
-
CompletionStageThreadPoolBulkhead
public CompletionStageThreadPoolBulkhead(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, int size, int queueSize)
-
-
Method Details
-
apply
Description copied from interface:FaultToleranceStrategyApply the fault tolerance strategy around the targetCallable. TheCallableis wrapped in anInvocationContext.- Parameters:
ctx- theInvocationContextwrapping theCallableguarded by this fault tolerance strategy- Returns:
- result computed by the target
Callable
-