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 Details

  • Method Details

    • apply

      public V apply(InvocationContext<V> ctx) throws Exception
      Description copied from interface: FaultToleranceStrategy
      Apply the fault tolerance strategy around the target Callable. The Callable is wrapped in an InvocationContext.
      Parameters:
      ctx - the InvocationContext wrapping the Callable guarded by this fault tolerance strategy
      Returns:
      result computed by the target Callable
      Throws:
      Exception - if result couldn't be computed