Interface Bulkhead

All Superinterfaces:
FtHandler, RuntimeType.Api<io.helidon.faulttolerance.BulkheadConfig>

@Contract public interface Bulkhead extends FtHandler, RuntimeType.Api<io.helidon.faulttolerance.BulkheadConfig>
Bulkhead protects a resource that cannot serve unlimited parallel requests.

When the limit of parallel execution is reached, requests are enqueued until the queue length is reached. Once both the limit and queue are full, additional attempts to invoke will end with a failed response with BulkheadException.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A Bulkhead listener for queueing operations.
    static interface 
    Provides statistics during the lifetime of a bulkhead, such as concurrent executions, accepted/rejected calls and queue size.
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.helidon.faulttolerance.BulkheadConfig.Builder
    Create a new bulkhead fluent API builder.
    boolean
    cancelSupplier(Supplier<?> supplier)
    Can be used to cancel a supplier while queued.
    static Bulkhead
    create(io.helidon.faulttolerance.BulkheadConfig config)
    Create Bulkhead from its configuration.
    static Bulkhead
    create(Consumer<io.helidon.faulttolerance.BulkheadConfig.Builder> builderConsumer)
    Create Bulkhead customizing its configuration.
    Provides access to internal stats for this bulkhead.

    Methods inherited from interface io.helidon.faulttolerance.FtHandler

    invoke, name

    Methods inherited from interface io.helidon.builder.api.RuntimeType.Api

    prototype
  • Method Details

    • create

      static Bulkhead create(io.helidon.faulttolerance.BulkheadConfig config)
      Create Bulkhead from its configuration.
      Parameters:
      config - configuration of a bulkhead to create
      Returns:
      a new bulkhead
    • create

      static Bulkhead create(Consumer<io.helidon.faulttolerance.BulkheadConfig.Builder> builderConsumer)
      Create Bulkhead customizing its configuration.
      Parameters:
      builderConsumer - consumer to update configuration of bulkhead
      Returns:
      a new bulkhead
    • builder

      static io.helidon.faulttolerance.BulkheadConfig.Builder builder()
      Create a new bulkhead fluent API builder.
      Returns:
      a new bulkhead builder
    • stats

      Provides access to internal stats for this bulkhead.
      Returns:
      internal stats.
    • cancelSupplier

      boolean cancelSupplier(Supplier<?> supplier)
      Can be used to cancel a supplier while queued.
      Parameters:
      supplier - the supplier
      Returns:
      outcome of cancellation