Package dev.failsafe

Class BulkheadBuilder<R>

    • Constructor Detail

      • BulkheadBuilder

        BulkheadBuilder​(int maxConcurrency)
    • Method Detail

      • build

        public Bulkhead<R> build()
        Builds a new Bulkhead using the builder's configuration.
      • withMaxWaitTime

        public BulkheadBuilder<R> withMaxWaitTime​(java.time.Duration maxWaitTime)
        Configures the maxWaitTime to wait for permits to be available. If permits cannot be acquired before the maxWaitTime is exceeded, then the bulkhead will throw BulkheadFullException.

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

        Throws:
        java.lang.NullPointerException - if maxWaitTime is null