Package com.ngrok.definitions

# Class EndpointCircuitBreaker

java.lang.Object
com.ngrok.definitions.EndpointCircuitBreaker

public class EndpointCircuitBreaker extends Object
A class encapsulating the `EndpointCircuitBreaker` resource.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `EndpointCircuitBreaker.Builder`
  Builder class for `EndpointCircuitBreaker`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `Optional<Boolean>`
  `getEnabled()`
  `true` if the module will be applied to traffic, `false` to disable.
  `double`
  `getErrorThresholdPercentage()`
  Error threshold percentage should be between 0 - 1.0, not 0-100.0
  `long`
  `getNumBuckets()`
  Integer number of buckets into which metrics are retained.
  `long`
  `getRollingWindow()`
  Integer number of seconds in the statistical rolling window that metrics are retained for.
  `Duration`
  `getTrippedDuration()`
  Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health
  `long`
  `getVolumeThreshold()`
  Integer number of requests in a rolling window that will trip the circuit.
  `int`
  `hashCode()`
  `static EndpointCircuitBreaker.Builder`
  `newBuilder()`
  Creates a new builder for the `EndpointCircuitBreaker` type.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### newBuilder

    public static EndpointCircuitBreaker.Builder newBuilder()
    Creates a new builder for the `EndpointCircuitBreaker` type.
    Returns:
      a new `EndpointCircuitBreaker.Builder`

  - ### getEnabled

    public Optional<Boolean> getEnabled()
    `true` if the module will be applied to traffic, `false` to disable. default `true` if unspecified
    Returns:
      the value of the property as a `boolean` wrapped in an `Optional`

  - ### getTrippedDuration

    public Duration getTrippedDuration()
    Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health
    Returns:
      the value of the property as a `Duration`

  - ### getRollingWindow

    public long getRollingWindow()
    Integer number of seconds in the statistical rolling window that metrics are retained for.
    Returns:
      the value of the property as a `long`

  - ### getNumBuckets

    public long getNumBuckets()
    Integer number of buckets into which metrics are retained. Max 128.
    Returns:
      the value of the property as a `long`

  - ### getVolumeThreshold

    public long getVolumeThreshold()
    Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.
    Returns:
      the value of the property as a `long`

  - ### getErrorThresholdPercentage

    public double getErrorThresholdPercentage()
    Error threshold percentage should be between 0 - 1.0, not 0-100.0
    Returns:
      the value of the property as a `double`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`