Package dev.failsafe

Class BulkheadConfig<R>

  • Type Parameters:
    R - result type

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

      • maxConcurrency

        int maxConcurrency
      • maxWaitTime

        java.time.Duration maxWaitTime
    • Constructor Detail

      • BulkheadConfig

        BulkheadConfig​(int maxConcurrency)
    • Method Detail

      • getMaxConcurrency

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

        public java.time.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:
        BulkheadBuilder.withMaxWaitTime(Duration)