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 aBulkhead
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
maxConcurrency
(package private) java.time.Duration
maxWaitTime
-
Fields inherited from class dev.failsafe.PolicyConfig
failureListener, successListener
-
-
Constructor Summary
Constructors Constructor Description BulkheadConfig(int maxConcurrency)
BulkheadConfig(BulkheadConfig<R> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxConcurrency()
Returns that max concurrent executions that are permitted within the bulkhead.java.time.Duration
getMaxWaitTime()
Returns the max time to wait for permits to be available.-
Methods inherited from class dev.failsafe.PolicyConfig
getFailureListener, getSuccessListener
-
-
-
-
Constructor Detail
-
BulkheadConfig
BulkheadConfig(int maxConcurrency)
-
BulkheadConfig
BulkheadConfig(BulkheadConfig<R> config)
-
-
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 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.
-
-