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>>
public class CompletionStageThreadPoolBulkhead<V> extends BulkheadBase<CompletionStage<V>>
Thread pool style bulkhead forCompletionStageasynchronous 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
Constructors Constructor Description CompletionStageThreadPoolBulkhead(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, int size, int queueSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<V>apply(InvocationContext<CompletionStage<V>> ctx)Apply the fault tolerance strategy around the targetCallable.
-
-
-
Constructor Detail
-
CompletionStageThreadPoolBulkhead
public CompletionStageThreadPoolBulkhead(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, int size, int queueSize)
-
-
Method Detail
-
apply
public CompletionStage<V> apply(InvocationContext<CompletionStage<V>> ctx)
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
-
-