BackOffer.BackOffStrategy
Modifier and Type | Field and Description |
---|---|
static io.prometheus.client.Histogram |
BACKOFF_DURATION |
Map<BackOffFunction.BackOffFuncType,BackOffFunction> |
backOffFunctionMap |
List<Exception> |
errors |
BATCH_GET_MAX_BACKOFF, COP_NEXT_MAX_BACKOFF, GET_MAX_BACKOFF, INGEST_BACKOFF, PD_INFO_BACKOFF, RAWKV_MAX_BACKOFF, SCANNER_NEXT_MAX_BACKOFF, SCATTER_REGION_BACKOFF, seconds, SPLIT_REGION_BACKOFF, TIKV_SWITCH_MODE_BACKOFF, TSO_MAX_BACKOFF
Modifier and Type | Method and Description |
---|---|
boolean |
canRetryAfterSleep(BackOffFunction.BackOffFuncType funcType)
canRetryAfterSleep sleeps a while base on the BackOffType and records the error message.
|
boolean |
canRetryAfterSleep(BackOffFunction.BackOffFuncType funcType,
long maxSleepMs) |
void |
checkTimeout()
check if deadline exceeded.
|
static ConcreteBackOffer |
create(BackOffer source) |
void |
doBackOff(BackOffFunction.BackOffFuncType funcType,
Exception err)
doBackOff sleeps a while base on the BackOffType and records the error message.
|
void |
doBackOffWithMaxSleep(BackOffFunction.BackOffFuncType funcType,
long maxSleepMs,
Exception err)
BackoffWithMaxSleep sleeps a while base on the backoffType and records the error message and
never sleep more than maxSleepMs for each sleep.
|
Long |
getClusterId() |
SlowLog |
getSlowLog() |
static ConcreteBackOffer |
newBatchGetMaxBackOff() |
static ConcreteBackOffer |
newCopNextMaxBackOff() |
static ConcreteBackOffer |
newCopNextMaxBackOff(long clusterId) |
static ConcreteBackOffer |
newCustomBackOff(int maxSleep) |
static ConcreteBackOffer |
newCustomBackOff(int maxSleep,
long clusterId) |
static ConcreteBackOffer |
newDeadlineBackOff(int timeoutInMs,
SlowLog slowLog) |
static ConcreteBackOffer |
newDeadlineBackOff(int timeoutInMs,
SlowLog slowLog,
long clusterId) |
static ConcreteBackOffer |
newGetBackOff(long clusterId) |
static ConcreteBackOffer |
newRawKVBackOff() |
static ConcreteBackOffer |
newRawKVBackOff(long clusterId) |
static ConcreteBackOffer |
newScannerNextMaxBackOff() |
static ConcreteBackOffer |
newTsoBackOff(long clusterId) |
public final Map<BackOffFunction.BackOffFuncType,BackOffFunction> backOffFunctionMap
public static final io.prometheus.client.Histogram BACKOFF_DURATION
public static ConcreteBackOffer newDeadlineBackOff(int timeoutInMs, SlowLog slowLog, long clusterId)
public static ConcreteBackOffer newDeadlineBackOff(int timeoutInMs, SlowLog slowLog)
public static ConcreteBackOffer newCustomBackOff(int maxSleep, long clusterId)
public static ConcreteBackOffer newCustomBackOff(int maxSleep)
public static ConcreteBackOffer newScannerNextMaxBackOff()
public static ConcreteBackOffer newBatchGetMaxBackOff()
public static ConcreteBackOffer newCopNextMaxBackOff()
public static ConcreteBackOffer newCopNextMaxBackOff(long clusterId)
public static ConcreteBackOffer newGetBackOff(long clusterId)
public static ConcreteBackOffer newRawKVBackOff(long clusterId)
public static ConcreteBackOffer newRawKVBackOff()
public static ConcreteBackOffer newTsoBackOff(long clusterId)
public static ConcreteBackOffer create(BackOffer source)
public void doBackOff(BackOffFunction.BackOffFuncType funcType, Exception err)
BackOffer
public void checkTimeout()
BackOffer
checkTimeout
in interface BackOffer
public boolean canRetryAfterSleep(BackOffFunction.BackOffFuncType funcType)
BackOffer
canRetryAfterSleep
in interface BackOffer
public boolean canRetryAfterSleep(BackOffFunction.BackOffFuncType funcType, long maxSleepMs)
public void doBackOffWithMaxSleep(BackOffFunction.BackOffFuncType funcType, long maxSleepMs, Exception err)
BackOffer
doBackOffWithMaxSleep
in interface BackOffer
public SlowLog getSlowLog()
getSlowLog
in interface BackOffer
public Long getClusterId()
getClusterId
in interface BackOffer
Copyright © 2024 PingCAP. All rights reserved.