Package dev.failsafe

Class BulkheadConfig<R>

java.lang.Object
dev.failsafe.PolicyConfig<R>
dev.failsafe.BulkheadConfig<R>
Type Parameters:
R - result type

public class BulkheadConfig<R> extends PolicyConfig<R>
Configuration for a Bulkhead.
  • Field Details

    • maxConcurrency

      int maxConcurrency
    • maxWaitTime

      Duration maxWaitTime
  • Constructor Details

    • BulkheadConfig

      BulkheadConfig(int maxConcurrency)
    • BulkheadConfig

      BulkheadConfig(BulkheadConfig<R> config)
  • Method Details

    • getMaxConcurrency

      public int getMaxConcurrency()
      Returns that max concurrent executions that are permitted within the bulkhead.
      See Also:
    • getMaxWaitTime

      public Duration getMaxWaitTime()
      Returns the max time to wait for permits to be available. If permits cannot be acquired before the max wait time is exceeded, then the bulkhead will throw BulkheadFullException.

      This setting only applies when the Bulkhead is used with the Failsafe class. It does not apply when the Bulkhead is used in a standalone way.

      See Also: