类 AbstractCircuitBreaker
java.lang.Object
com.alibaba.csp.sentinel.slots.block.degrade.circuitbreaker.AbstractCircuitBreaker
- 所有已实现的接口:
CircuitBreaker
- 从以下版本开始:
- 1.8.0
- 作者:
- Eric Zhao
-
嵌套类概要
从接口继承的嵌套类/接口 com.alibaba.csp.sentinel.slots.block.degrade.circuitbreaker.CircuitBreaker
CircuitBreaker.State -
字段概要
字段修饰符和类型字段说明protected final AtomicReference<CircuitBreaker.State>protected longprotected final intprotected final DegradeRule -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Get current state of the circuit breaker.protected booleanfromCloseToOpen(double snapshotValue) protected booleanprotected booleanfromHalfOpenToOpen(double snapshotValue) protected booleanfromOpenToHalfOpen(Context context) getRule()Get the associated circuit breaking rule.protected booleanprotected voidtransformToOpen(double triggerValue) booleanAcquires permission of an invocation only if it is available at the time of invoking.protected void从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.alibaba.csp.sentinel.slots.block.degrade.circuitbreaker.CircuitBreaker
onRequestComplete
-
字段详细资料
-
rule
-
recoveryTimeoutMs
protected final int recoveryTimeoutMs -
currentState
-
nextRetryTimestamp
protected volatile long nextRetryTimestamp
-
-
构造器详细资料
-
AbstractCircuitBreaker
-
-
方法详细资料
-
getRule
从接口复制的说明:CircuitBreakerGet the associated circuit breaking rule.- 指定者:
getRule在接口中CircuitBreaker- 返回:
- associated circuit breaking rule
-
currentState
从接口复制的说明:CircuitBreakerGet current state of the circuit breaker.- 指定者:
currentState在接口中CircuitBreaker- 返回:
- current state of the circuit breaker
-
tryPass
从接口复制的说明:CircuitBreakerAcquires permission of an invocation only if it is available at the time of invoking.- 指定者:
tryPass在接口中CircuitBreaker- 参数:
context- context of current invocation- 返回:
trueif permission was acquired andfalseotherwise
-
retryTimeoutArrived
protected boolean retryTimeoutArrived() -
updateNextRetryTimestamp
protected void updateNextRetryTimestamp() -
fromCloseToOpen
protected boolean fromCloseToOpen(double snapshotValue) -
fromOpenToHalfOpen
-
fromHalfOpenToOpen
protected boolean fromHalfOpenToOpen(double snapshotValue) -
fromHalfOpenToClose
protected boolean fromHalfOpenToClose() -
transformToOpen
protected void transformToOpen(double triggerValue)
-