Package com.ngrok.definitions
Class EndpointCircuitBreaker.Builder
java.lang.Object
com.ngrok.definitions.EndpointCircuitBreaker.Builder
- Enclosing class:
- EndpointCircuitBreaker
Builder class for 
EndpointCircuitBreaker.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Constructs theEndpointCircuitBreakerinstance.enabled(boolean enabled) trueif the module will be applied to traffic,falseto disable.trueif the module will be applied to traffic,falseto 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- 
enabledtrueif the module will be applied to traffic,falseto disable. defaulttrueif unspecified- Parameters:
- enabled- the value of the- enabledparameter as a- boolean
- Returns:
- this builder instance
 
- 
enabledtrueif the module will be applied to traffic,falseto disable. defaulttrueif unspecified- Parameters:
- enabled- the value of the- enabledparameter as a- boolean, wrapped in an- Optional
- Returns:
- this builder instance
 
- 
trippedDurationInteger number of seconds after which the circuit is tripped to wait before re-evaluating upstream health- Parameters:
- trippedDuration- the value of the- tripped_durationparameter as a- Duration
- Returns:
- this builder instance
 
- 
trippedDurationInteger number of seconds after which the circuit is tripped to wait before re-evaluating upstream health
- 
rollingWindowInteger number of seconds in the statistical rolling window that metrics are retained for.- Parameters:
- rollingWindow- the value of the- rolling_windowparameter as a- long
- Returns:
- this builder instance
 
- 
rollingWindowInteger number of seconds in the statistical rolling window that metrics are retained for.- Parameters:
- rollingWindow- the value of the- rolling_windowparameter as a- long, wrapped in an- Optional
- Returns:
- this builder instance
 
- 
numBucketsInteger number of buckets into which metrics are retained. Max 128.- Parameters:
- numBuckets- the value of the- num_bucketsparameter as a- long
- Returns:
- this builder instance
 
- 
numBucketsInteger number of buckets into which metrics are retained. Max 128.- Parameters:
- numBuckets- the value of the- num_bucketsparameter as a- long, wrapped in an- Optional
- Returns:
- this builder instance
 
- 
volumeThresholdInteger number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.- Parameters:
- volumeThreshold- the value of the- volume_thresholdparameter as a- long
- Returns:
- this builder instance
 
- 
volumeThresholdInteger number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.- Parameters:
- volumeThreshold- the value of the- volume_thresholdparameter as a- long, wrapped in an- Optional
- Returns:
- this builder instance
 
- 
errorThresholdPercentageError threshold percentage should be between 0 - 1.0, not 0-100.0- Parameters:
- errorThresholdPercentage- the value of the- error_threshold_percentageparameter as a- double
- Returns:
- this builder instance
 
- 
errorThresholdPercentagepublic EndpointCircuitBreaker.Builder errorThresholdPercentage(Optional<Double> errorThresholdPercentage) Error threshold percentage should be between 0 - 1.0, not 0-100.0- Parameters:
- errorThresholdPercentage- the value of the- error_threshold_percentageparameter as a- double, wrapped in an- Optional
- Returns:
- this builder instance
 
- 
buildConstructs theEndpointCircuitBreakerinstance.- Returns:
- a new EndpointCircuitBreaker
 
 
-