public interface CircuitBreaker extends Closeable
Modifier and Type | Interface and Description |
---|---|
static class |
CircuitBreaker.Status |
Modifier and Type | Method and Description |
---|---|
boolean |
allowRequest()
Every requests asks this if it is allowed to proceed or not.
|
boolean |
attemptExecution()
Invoked at start of command execution to attempt an execution.
|
CircuitBreakerMetrics |
getMetrics()
Get the Circuit Breaker Metrics Object.
|
void |
recordAttemptFailure()
Invoked on unsuccessful executions as part of feedback mechanism when in a half-open state.
|
void |
recordAttemptSuccess()
Invoked on successful executions as part of feedback mechanism when in a half-open state.
|
boolean allowRequest()
boolean attemptExecution()
void recordAttemptSuccess()
void recordAttemptFailure()
CircuitBreakerMetrics getMetrics()
Copyright © 2024 PingCAP. All rights reserved.