public abstract class AbstractRegionStoreClient extends AbstractGRPCClient<TikvGrpc.TikvBlockingStub,TikvGrpc.TikvFutureStub> implements RegionErrorReceiver
| 限定符和类型 | 字段和说明 |
|---|---|
protected RequestKeyCodec |
codec |
protected TiRegion |
region |
protected RegionManager |
regionManager |
static io.prometheus.client.Histogram |
SEEK_LEADER_STORE_DURATION |
static io.prometheus.client.Histogram |
SEEK_PROXY_STORE_DURATION |
protected TiStore |
store |
asyncStub, blockingStub, channelFactory, conf, timeout| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractRegionStoreClient(TiConfiguration conf,
TiRegion region,
TiStore store,
ChannelFactory channelFactory,
TikvGrpc.TikvBlockingStub blockingStub,
TikvGrpc.TikvFutureStub asyncStub,
RegionManager regionManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected TikvGrpc.TikvFutureStub |
getAsyncStub() |
protected TikvGrpc.TikvBlockingStub |
getBlockingStub() |
TiRegion |
getRegion() |
protected Kvrpcpb.Context |
makeContext() |
protected Kvrpcpb.Context |
makeContext(Metapb.Peer peer) |
protected Kvrpcpb.Context |
makeContext(Set<Long> resolvedLocks,
TiStoreType storeType,
SlowLog slowLog) |
protected Kvrpcpb.Context |
makeContext(TiStoreType storeType,
SlowLog slowLog) |
boolean |
onNotLeader(TiRegion newRegion,
BackOffer backOffer)
onNotLeader deals with NotLeaderError and returns whether re-splitting key range is needed
|
boolean |
onStoreUnreachable(BackOffer backOffer) |
callAsyncWithRetry, callServerStreamingWithRetry, callWithRetry, checkHealth, getConf, getTimeout, setTimeoutpublic static final io.prometheus.client.Histogram SEEK_LEADER_STORE_DURATION
public static final io.prometheus.client.Histogram SEEK_PROXY_STORE_DURATION
protected final RegionManager regionManager
protected final RequestKeyCodec codec
protected TiRegion region
protected TiStore store
protected AbstractRegionStoreClient(TiConfiguration conf, TiRegion region, TiStore store, ChannelFactory channelFactory, TikvGrpc.TikvBlockingStub blockingStub, TikvGrpc.TikvFutureStub asyncStub, RegionManager regionManager)
public TiRegion getRegion()
getRegion 在接口中 RegionErrorReceiverprotected TikvGrpc.TikvBlockingStub getBlockingStub()
protected TikvGrpc.TikvFutureStub getAsyncStub()
public void close()
throws GrpcException
close 在接口中 AutoCloseableGrpcExceptionpublic boolean onNotLeader(TiRegion newRegion, BackOffer backOffer)
onNotLeader 在接口中 RegionErrorReceivernewRegion - the new region presented by NotLeader Errorpublic boolean onStoreUnreachable(BackOffer backOffer)
onStoreUnreachable 在接口中 RegionErrorReceiverprotected Kvrpcpb.Context makeContext(TiStoreType storeType, SlowLog slowLog)
protected Kvrpcpb.Context makeContext(Set<Long> resolvedLocks, TiStoreType storeType, SlowLog slowLog)
protected Kvrpcpb.Context makeContext()
protected Kvrpcpb.Context makeContext(Metapb.Peer peer)
Copyright © 2023 PingCAP. All rights reserved.