Package dev.failsafe
Class BulkheadBuilder<R>
- Type Parameters:
R- result type
- All Implemented Interfaces:
PolicyListeners<BulkheadBuilder<R>,R>
Builds
Bulkhead instances.
This class is not threadsafe.
- Author:
- Jonathan Halterman
- See Also:
-
Field Summary
Fields inherited from class dev.failsafe.PolicyBuilder
config -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newBulkheadusing the builder's configuration.withMaxWaitTime(Duration maxWaitTime) Configures themaxWaitTimeto wait for permits to be available.Methods inherited from class dev.failsafe.PolicyBuilder
onFailure, onSuccess
-
Method Details
-
build
Builds a newBulkheadusing the builder's configuration. -
withMaxWaitTime
Configures themaxWaitTimeto wait for permits to be available. If permits cannot be acquired before themaxWaitTimeis exceeded, then the bulkhead will throwBulkheadFullException.This setting only applies when the resulting Bulkhead is used with the
Failsafeclass. It does not apply when the Bulkhead is used in a standalone way.- Throws:
NullPointerException- ifmaxWaitTimeis null
-