Annotation Interface Bulkhead
@Documented
@Retention(RUNTIME)
@Target({METHOD,TYPE})
@Inherited
@InterceptorBinding
public @interface Bulkhead
Define bulkhead policy to limit the number of the concurrent calls to an instance.
If this is used together with Asynchronous, it means thread isolation.
Otherwise, it means semaphore isolation.
- Thread isolation - execution happens on a separate thread and the concurrent requests are confined in a fixed number of a thread pool.
- Semaphore isolation - execution happens on the calling thread and the concurrent requests are constrained by the semaphore count.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintSpecify the maximum number of concurrent calls to an instance.intSpecify the waiting task queue.
-
Element Details
-
value
int valueSpecify the maximum number of concurrent calls to an instance. The value must be greater than 0. Otherwise,FaultToleranceDefinitionExceptionoccurs.- Returns:
- the limit of the concurrent calls
- Default:
- 10
-
waitingTaskQueue
int waitingTaskQueueSpecify the waiting task queue. This setting only takes effect on asynchronous invocation, achieved by usingAsynchronous. The value must be greater than 0. Otherwise,FaultToleranceDefinitionExceptionoccurs.- Returns:
- the waiting queue size
- Default:
- 10
-