public class KVErrorHandler<RespT> extends Object implements ErrorHandler<RespT>
Constructor and Description |
---|
KVErrorHandler(RegionManager regionManager,
RegionErrorReceiver recv,
AbstractLockResolverClient lockResolverClient,
Function<RespT,Errorpb.Error> getRegionError,
Function<RespT,Kvrpcpb.KeyError> getKeyError,
Function<ResolveLockResult,Object> resolveLockResultCallback,
long callerStartTS,
boolean forWrite) |
Modifier and Type | Method and Description |
---|---|
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 KVErrorHandler(RegionManager regionManager, RegionErrorReceiver recv, AbstractLockResolverClient lockResolverClient, Function<RespT,Errorpb.Error> getRegionError, Function<RespT,Kvrpcpb.KeyError> getKeyError, Function<ResolveLockResult,Object> resolveLockResultCallback, long callerStartTS, boolean forWrite)
public boolean handleResponseError(BackOffer backOffer, RespT resp)
ErrorHandler
handleResponseError
in interface ErrorHandler<RespT>
backOffer
- Back offer used for retryresp
- the response to handlepublic boolean handleRequestError(BackOffer backOffer, Exception e)
ErrorHandler
handleRequestError
in interface ErrorHandler<RespT>
backOffer
- Back offer used for retrye
- Exception received during a calling processCopyright © 2024 PingCAP. All rights reserved.