| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final float | |
| private final Metrics | |
| private int | |
| private final LongAdder | |
| private final long | |
| private final float |
| Access | Constructor and Description |
|---|---|
| private | CircuitBreakerMetrics(int slidingWindowSize, CircuitBreakerConfig.
|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private Metrics | buildCountBasedMetrics(int slidingWindowSize, CircuitBreakerConfig.
|
| private Metrics | buildTimeBasedMetrics(int slidingWindowSize, Clock clock, CircuitBreakerConfig.
|
| private CircuitBreakerMetrics. | Returns: false, if the thresholds haven't been exceeded.a metrics snapshot snapshot)Checks if the failure rate is above the threshold or if the slow calls percentage is above the threshold. |
| pack-priv static CircuitBreakerMetrics | |
| pack-priv static CircuitBreakerMetrics | |
| pack-priv static CircuitBreakerMetrics | |
| pack-priv static CircuitBreakerMetrics | |
| pack-priv static CircuitBreakerMetrics | |
| private float | |
| public float | getFailureRate()
Implements io. Returns the current failure rate in percentage. |
| public int | getNumberOfBufferedCalls()
Implements io. Returns the current total number of buffered calls in the ring buffer. |
| public int | getNumberOfFailedCalls()
Implements io. Returns the current number of failed buffered calls in the ring buffer. |
| public long | getNumberOfNotPermittedCalls()
Implements io. Returns the current number of not permitted calls, when the state is OPEN. |
| public int | getNumberOfSlowCalls()
Implements io. Returns the current total number of calls which were slower than a certain threshold. |
| public int | getNumberOfSlowFailedCalls()
Implements io. Returns the current number of failed calls which were slower than a certain threshold. |
| public int | getNumberOfSlowSuccessfulCalls()
Implements io. Returns the current number of successful calls which were slower than a certain threshold. |
| public int | getNumberOfSuccessfulCalls()
Implements io. Returns the current number of successful buffered calls in the ring buffer. |
| private float | |
| public float | getSlowCallRate()
Implements io. Returns the current percentage of calls which were slower than a certain threshold. |
| pack-priv void | onCallNotPermitted()
Records a call which was not permitted, because the CircuitBreaker state is OPEN. |
| public CircuitBreakerMetrics. | |
| public CircuitBreakerMetrics. |
| failureRateThreshold | back to summary |
|---|---|
| private final float failureRateThreshold | |
| metrics | back to summary |
|---|---|
| private final Metrics metrics | |
| minimumNumberOfCalls | back to summary |
|---|---|
| private int minimumNumberOfCalls | |
| numberOfNotPermittedCalls | back to summary |
|---|---|
| private final LongAdder numberOfNotPermittedCalls | |
| slowCallDurationThresholdInNanos | back to summary |
|---|---|
| private final long slowCallDurationThresholdInNanos | |
| slowCallRateThreshold | back to summary |
|---|---|
| private final float slowCallRateThreshold | |
| CircuitBreakerMetrics | back to summary |
|---|---|
| private CircuitBreakerMetrics(int slidingWindowSize, CircuitBreakerConfig. | |
| CircuitBreakerMetrics | back to summary |
|---|---|
| private CircuitBreakerMetrics(int slidingWindowSize, CircuitBreakerConfig circuitBreakerConfig) | |
| buildCountBasedMetrics | back to summary |
|---|---|
| private Metrics buildCountBasedMetrics(int slidingWindowSize, CircuitBreakerConfig. | |
| buildTimeBasedMetrics | back to summary |
|---|---|
| private Metrics buildTimeBasedMetrics(int slidingWindowSize, Clock clock, CircuitBreakerConfig. | |
| checkIfThresholdsExceeded | back to summary |
|---|---|
| private CircuitBreakerMetrics. Checks if the failure rate is above the threshold or if the slow calls percentage is above the threshold.
| |
| forClosed | back to summary |
|---|---|
| pack-priv static CircuitBreakerMetrics forClosed(CircuitBreakerConfig circuitBreakerConfig) | |
| forDisabled | back to summary |
|---|---|
| pack-priv static CircuitBreakerMetrics forDisabled(CircuitBreakerConfig circuitBreakerConfig) | |
| forForcedOpen | back to summary |
|---|---|
| pack-priv static CircuitBreakerMetrics forForcedOpen(CircuitBreakerConfig circuitBreakerConfig) | |
| forHalfOpen | back to summary |
|---|---|
| pack-priv static CircuitBreakerMetrics forHalfOpen(int permittedNumberOfCallsInHalfOpenState, CircuitBreakerConfig circuitBreakerConfig) | |
| forMetricsOnly | back to summary |
|---|---|
| pack-priv static CircuitBreakerMetrics forMetricsOnly(CircuitBreakerConfig circuitBreakerConfig) | |
| getFailureRate | back to summary |
|---|---|
| private float getFailureRate(Snapshot snapshot) | |
| getFailureRate | back to summary |
|---|---|
| public float getFailureRate() Implements io. Doc from io. Returns the current failure rate in percentage. If the number of measured calls is below the minimum number of measured calls, it returns -1.
| |
| getNumberOfBufferedCalls | back to summary |
|---|---|
| public int getNumberOfBufferedCalls() Implements io. Doc from io. Returns the current total number of buffered calls in the ring buffer.
| |
| getNumberOfFailedCalls | back to summary |
|---|---|
| public int getNumberOfFailedCalls() Implements io. Doc from io. Returns the current number of failed buffered calls in the ring buffer.
| |
| getNumberOfNotPermittedCalls | back to summary |
|---|---|
| public long getNumberOfNotPermittedCalls() Implements io. Doc from io. Returns the current number of not permitted calls, when the state is OPEN. The number of denied calls is always 0, when the CircuitBreaker state is CLOSED or HALF_OPEN. The number of denied calls is only increased when the CircuitBreaker state is OPEN.
| |
| getNumberOfSlowCalls | back to summary |
|---|---|
| public int getNumberOfSlowCalls() Implements io. Doc from io. Returns the current total number of calls which were slower than a certain threshold.
| |
| getNumberOfSlowFailedCalls | back to summary |
|---|---|
| public int getNumberOfSlowFailedCalls() Implements io. Doc from io. Returns the current number of failed calls which were slower than a certain threshold.
| |
| getNumberOfSlowSuccessfulCalls | back to summary |
|---|---|
| public int getNumberOfSlowSuccessfulCalls() Implements io. Doc from io. Returns the current number of successful calls which were slower than a certain threshold.
| |
| getNumberOfSuccessfulCalls | back to summary |
|---|---|
| public int getNumberOfSuccessfulCalls() Implements io. Doc from io. Returns the current number of successful buffered calls in the ring buffer.
| |
| getSlowCallRate | back to summary |
|---|---|
| private float getSlowCallRate(Snapshot snapshot) | |
| getSlowCallRate | back to summary |
|---|---|
| public float getSlowCallRate() Implements io. Doc from io. Returns the current percentage of calls which were slower than a certain threshold. If the number of measured calls is below the minimum number of measured calls, it returns -1.
| |
| onCallNotPermitted | back to summary |
|---|---|
| pack-priv void onCallNotPermitted() Records a call which was not permitted, because the CircuitBreaker state is OPEN. | |
| onError | back to summary |
|---|---|
| public CircuitBreakerMetrics. Records a failed call and checks if the thresholds are exceeded.
| |
| onSuccess | back to summary |
|---|---|
| public CircuitBreakerMetrics. Records a successful call and checks if the thresholds are exceeded.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final CircuitBreakerMetrics. | |
| public static final CircuitBreakerMetrics. | |
| public static final CircuitBreakerMetrics. | |
| public static final CircuitBreakerMetrics. | |
| public static final CircuitBreakerMetrics. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static CircuitBreakerMetrics. | |
| public static CircuitBreakerMetrics. |
| ABOVE_THRESHOLDS | back to summary |
|---|---|
| public static final CircuitBreakerMetrics. | |
| BELOW_MINIMUM_CALLS_THRESHOLD | back to summary |
|---|---|
| public static final CircuitBreakerMetrics. | |
| BELOW_THRESHOLDS | back to summary |
|---|---|
| public static final CircuitBreakerMetrics. | |
| FAILURE_RATE_ABOVE_THRESHOLDS | back to summary |
|---|---|
| public static final CircuitBreakerMetrics. | |
| SLOW_CALL_RATE_ABOVE_THRESHOLDS | back to summary |
|---|---|
| public static final CircuitBreakerMetrics. | |
| Result | back to summary |
|---|---|
| private Result() | |
| hasExceededThresholds | back to summary |
|---|---|
| public static boolean hasExceededThresholds(CircuitBreakerMetrics. | |
| hasFailureRateExceededThreshold | back to summary |
|---|---|
| public static boolean hasFailureRateExceededThreshold(CircuitBreakerMetrics. | |
| hasSlowCallRateExceededThreshold | back to summary |
|---|---|
| public static boolean hasSlowCallRateExceededThreshold(CircuitBreakerMetrics. | |
| valueOf | back to summary |
|---|---|
| public static CircuitBreakerMetrics. | |
| values | back to summary |
|---|---|
| public static CircuitBreakerMetrics. | |