public class RegionErrorHandler<RespT> extends Object implements ErrorHandler<RespT>
Modifier and Type | Field and Description |
---|---|
static int |
NO_LEADER_STORE_ID |
Constructor and Description |
---|
RegionErrorHandler(RegionManager regionManager,
RegionErrorReceiver recv,
Function<RespT,Errorpb.Error> getRegionError) |
Modifier and Type | Method and Description |
---|---|
TiRegion |
getRegion() |
Errorpb.Error |
getRegionError(RespT resp) |
boolean |
handleRegionError(BackOffer backOffer,
Errorpb.Error error) |
boolean |
handleRequestError(BackOffer backOffer,
Exception e)
Handle the error received during a calling process before it could return a normal response.
|
boolean |
handleResponseError(BackOffer backOffer,
RespT resp)
Handle the error received in the response after a calling process completes.
|
public static final int NO_LEADER_STORE_ID
public RegionErrorHandler(RegionManager regionManager, RegionErrorReceiver recv, Function<RespT,Errorpb.Error> getRegionError)
public boolean handleResponseError(BackOffer backOffer, RespT resp)
ErrorHandler
handleResponseError
in interface ErrorHandler<RespT>
backOffer
- Back offer used for retryresp
- the response to handlepublic boolean handleRegionError(BackOffer backOffer, Errorpb.Error error)
public boolean handleRequestError(BackOffer backOffer, Exception e)
ErrorHandler
handleRequestError
in interface ErrorHandler<RespT>
backOffer
- Back offer used for retrye
- Exception received during a calling processpublic Errorpb.Error getRegionError(RespT resp)
public TiRegion getRegion()
Copyright © 2024 PingCAP. All rights reserved.