Class SemaphoreBulkhead<V>
- java.lang.Object
-
- io.smallrye.faulttolerance.core.bulkhead.BulkheadBase<V>
-
- io.smallrye.faulttolerance.core.bulkhead.SemaphoreBulkhead<V>
-
- All Implemented Interfaces:
FaultToleranceStrategy<V>
public class SemaphoreBulkhead<V> extends BulkheadBase<V>
Semaphore style bulkhead for synchronous executions.
-
-
Constructor Summary
Constructors Constructor Description SemaphoreBulkhead(FaultToleranceStrategy<V> delegate, String description, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vapply(InvocationContext<V> ctx)Apply the fault tolerance strategy around the targetCallable.
-
-
-
Constructor Detail
-
SemaphoreBulkhead
public SemaphoreBulkhead(FaultToleranceStrategy<V> delegate, String description, int size)
-
-
Method Detail
-
apply
public V apply(InvocationContext<V> ctx) throws Exception
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 - Throws:
Exception- if result couldn't be computed
-
-