Class Bulkhead<V>

java.lang.Object
io.smallrye.faulttolerance.core.bulkhead.Bulkhead<V>
All Implemented Interfaces:
FaultToleranceStrategy<V>

public class Bulkhead<V> extends Object implements FaultToleranceStrategy<V>
Unified bulkhead that behaves in a semaphore fashion for synchronous executions and in a thread pool fashion for asynchronous executions.

Implements a proper queue of tasks for async executions. When an async task (that was previously allowed to enter) leaves the bulkhead, it will attempt to take one task from the queue and execute it.

It also allows synchronous queueing, which is an implementation of a thread pool bulkhead for pseudo-asynchronous invocations. Those are already offloaded to an extra thread and so don't require proper queueing, just two semaphores.