public class KVClient extends Object implements AutoCloseable
| 构造器和说明 |
|---|
KVClient(TiConfiguration conf,
RegionStoreClient.RegionStoreClientBuilder clientBuilder,
ExecutorService batchGetThreadPool) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<Kvrpcpb.KvPair> |
batchGet(BackOffer backOffer,
List<com.google.protobuf.ByteString> keys,
long version)
Get a set of key-value pair by keys from TiKV
|
void |
close() |
com.google.protobuf.ByteString |
get(com.google.protobuf.ByteString key,
long version)
Get a key-value pair from TiKV if key exists
|
public KVClient(TiConfiguration conf, RegionStoreClient.RegionStoreClientBuilder clientBuilder, ExecutorService batchGetThreadPool)
public void close()
close 在接口中 AutoCloseablepublic com.google.protobuf.ByteString get(com.google.protobuf.ByteString key,
long version)
throws GrpcException
key - keyGrpcExceptionpublic List<Kvrpcpb.KvPair> batchGet(BackOffer backOffer, List<com.google.protobuf.ByteString> keys, long version) throws GrpcException
backOffer - keys - version - GrpcExceptionCopyright © 2022 PingCAP. All rights reserved.