Package dev.failsafe
Class BulkheadConfig<R>
java.lang.Object
dev.failsafe.PolicyConfig<R>
dev.failsafe.BulkheadConfig<R>
- Type Parameters:
R
- result type
Configuration for a
Bulkhead
.-
Field Summary
FieldsFields inherited from class dev.failsafe.PolicyConfig
failureListener, successListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns that max concurrent executions that are permitted within the bulkhead.Returns the max time to wait for permits to be available.Methods inherited from class dev.failsafe.PolicyConfig
getFailureListener, getSuccessListener
-
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
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 throwBulkheadFullException
.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:
-