Annotation 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 Elements
    Modifier and Type
    Optional Element
    Description
    int
    Specify the maximum number of concurrent calls to an instance.
    int
    Specify the waiting task queue.
  • Element Details

    • value

      int value
      Specify the maximum number of concurrent calls to an instance. The value must be greater than 0. Otherwise, FaultToleranceDefinitionException occurs.
      Returns:
      the limit of the concurrent calls
      Default:
      10
    • waitingTaskQueue

      int waitingTaskQueue
      Specify the waiting task queue. This setting only takes effect on asynchronous invocation, achieved by using Asynchronous. The value must be greater than 0. Otherwise, FaultToleranceDefinitionException occurs.
      Returns:
      the waiting queue size
      Default:
      10