Class Bulkhead.Builder

java.lang.Object
io.helidon.nima.faulttolerance.Bulkhead.Builder
All Implemented Interfaces:
Builder<Bulkhead.Builder,Bulkhead>, Supplier<Bulkhead>
Enclosing interface:
Bulkhead

public static class Bulkhead.Builder extends Object implements Builder<Bulkhead.Builder,Bulkhead>
Fluent API builder for Bulkhead.
  • Method Details

    • build

      public Bulkhead build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<Bulkhead.Builder,Bulkhead>
      Returns:
      instance of the built type
    • limit

      public Bulkhead.Builder limit(int limit)
      Maximal number of parallel requests going through this bulkhead. When the limit is reached, additional requests are enqueued.
      Parameters:
      limit - maximal number of parallel calls, defaults is 10
      Returns:
      updated builder instance
    • queueLength

      public Bulkhead.Builder queueLength(int queueLength)
      Maximal number of enqueued requests waiting for processing. When the limit is reached, additional attempts to invoke a request will receive a BulkheadException.
      Parameters:
      queueLength - length of queue
      Returns:
      updated builder instance
    • name

      public Bulkhead.Builder name(String name)
      A name assigned for debugging, error reporting or configuration purposes.
      Parameters:
      name - the name
      Returns:
      updated builder instance
    • addQueueListener

      public Bulkhead.Builder addQueueListener(Bulkhead.QueueListener listener)
      Add a queue listener to this bulkhead.
      Parameters:
      listener - a queue listener
      Returns:
      updated builder instance