Package com.ngrok.definitions
Class EndpointCircuitBreaker.Builder
java.lang.Object
com.ngrok.definitions.EndpointCircuitBreaker.Builder
- Enclosing class:
- EndpointCircuitBreaker
Builder class for
EndpointCircuitBreaker
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs theEndpointCircuitBreaker
instance.enabled
(boolean enabled) true
if the module will be applied to traffic,false
to disable.true
if the module will be applied to traffic,false
to disable.errorThresholdPercentage
(double errorThresholdPercentage) Error threshold percentage should be between 0 - 1.0, not 0-100.0errorThresholdPercentage
(Optional<Double> errorThresholdPercentage) Error threshold percentage should be between 0 - 1.0, not 0-100.0numBuckets
(long numBuckets) Integer number of buckets into which metrics are retained.numBuckets
(Optional<Long> numBuckets) Integer number of buckets into which metrics are retained.rollingWindow
(long rollingWindow) Integer number of seconds in the statistical rolling window that metrics are retained for.rollingWindow
(Optional<Long> rollingWindow) Integer number of seconds in the statistical rolling window that metrics are retained for.trippedDuration
(Duration trippedDuration) Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream healthtrippedDuration
(Optional<Duration> trippedDuration) Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream healthvolumeThreshold
(long volumeThreshold) Integer number of requests in a rolling window that will trip the circuit.volumeThreshold
(Optional<Long> volumeThreshold) Integer number of requests in a rolling window that will trip the circuit.
-
Method Details
-
enabled
true
if the module will be applied to traffic,false
to disable. defaulttrue
if unspecified- Parameters:
enabled
- the value of theenabled
parameter as aboolean
- Returns:
- this builder instance
-
enabled
true
if the module will be applied to traffic,false
to disable. defaulttrue
if unspecified- Parameters:
enabled
- the value of theenabled
parameter as aboolean
, wrapped in anOptional
- Returns:
- this builder instance
-
trippedDuration
Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health- Parameters:
trippedDuration
- the value of thetripped_duration
parameter as aDuration
- Returns:
- this builder instance
-
trippedDuration
Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health -
rollingWindow
Integer number of seconds in the statistical rolling window that metrics are retained for.- Parameters:
rollingWindow
- the value of therolling_window
parameter as along
- Returns:
- this builder instance
-
rollingWindow
Integer number of seconds in the statistical rolling window that metrics are retained for.- Parameters:
rollingWindow
- the value of therolling_window
parameter as along
, wrapped in anOptional
- Returns:
- this builder instance
-
numBuckets
Integer number of buckets into which metrics are retained. Max 128.- Parameters:
numBuckets
- the value of thenum_buckets
parameter as along
- Returns:
- this builder instance
-
numBuckets
Integer number of buckets into which metrics are retained. Max 128.- Parameters:
numBuckets
- the value of thenum_buckets
parameter as along
, wrapped in anOptional
- Returns:
- this builder instance
-
volumeThreshold
Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.- Parameters:
volumeThreshold
- the value of thevolume_threshold
parameter as along
- Returns:
- this builder instance
-
volumeThreshold
Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.- Parameters:
volumeThreshold
- the value of thevolume_threshold
parameter as along
, wrapped in anOptional
- Returns:
- this builder instance
-
errorThresholdPercentage
Error threshold percentage should be between 0 - 1.0, not 0-100.0- Parameters:
errorThresholdPercentage
- the value of theerror_threshold_percentage
parameter as adouble
- Returns:
- this builder instance
-
errorThresholdPercentage
public EndpointCircuitBreaker.Builder errorThresholdPercentage(Optional<Double> errorThresholdPercentage) Error threshold percentage should be between 0 - 1.0, not 0-100.0- Parameters:
errorThresholdPercentage
- the value of theerror_threshold_percentage
parameter as adouble
, wrapped in anOptional
- Returns:
- this builder instance
-
build
Constructs theEndpointCircuitBreaker
instance.- Returns:
- a new
EndpointCircuitBreaker
-