public class ImporterStoreClient<RequestClass,ResponseClass> extends AbstractGRPCClient<ImportSSTGrpc.ImportSSTBlockingStub,ImportSSTGrpc.ImportSSTFutureStub> implements io.grpc.stub.StreamObserver<ResponseClass>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ImporterStoreClient.ImporterStoreClientBuilder<RequestClass,ResponseClass> |
asyncStub, blockingStub, channelFactory, conf, timeout| 限定符 | 构造器和说明 |
|---|---|
protected |
ImporterStoreClient(TiConfiguration conf,
ChannelFactory channelFactory,
ImportSSTGrpc.ImportSSTBlockingStub blockingStub,
ImportSSTGrpc.ImportSSTFutureStub asyncStub,
ImportSSTGrpc.ImportSSTStub stub) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
finishWrite()
This API should be called after `writeBatch`.
|
protected ImportSSTGrpc.ImportSSTFutureStub |
getAsyncStub() |
protected ImportSSTGrpc.ImportSSTBlockingStub |
getBlockingStub() |
protected ImportSSTGrpc.ImportSSTStub |
getStub() |
Throwable |
getWriteError() |
ResponseClass |
getWriteResponse() |
boolean |
hasWriteResponseError() |
boolean |
isWriteResponseReceived() |
void |
multiIngest(Kvrpcpb.Context ctx,
Object writeResponse)
This API should be called after `finishWrite`.
|
void |
onCompleted() |
void |
onError(Throwable t) |
void |
onNext(ResponseClass response) |
void |
startWrite()
Ingest KV pairs to RawKV/Txn using gRPC streaming mode.
|
void |
switchMode(ImportSstpb.SwitchMode mode) |
void |
writeBatch(RequestClass request)
This API should be called after `startWrite`.
|
callAsyncWithRetry, callServerStreamingWithRetry, callWithRetry, checkHealth, getConf, getTimeout, setTimeoutprotected ImporterStoreClient(TiConfiguration conf, ChannelFactory channelFactory, ImportSSTGrpc.ImportSSTBlockingStub blockingStub, ImportSSTGrpc.ImportSSTFutureStub asyncStub, ImportSSTGrpc.ImportSSTStub stub)
public boolean isWriteResponseReceived()
public ResponseClass getWriteResponse()
public boolean hasWriteResponseError()
public Throwable getWriteError()
public void onNext(ResponseClass response)
onNext 在接口中 io.grpc.stub.StreamObserver<ResponseClass>public void onError(Throwable t)
onError 在接口中 io.grpc.stub.StreamObserver<ResponseClass>public void onCompleted()
onCompleted 在接口中 io.grpc.stub.StreamObserver<ResponseClass>public void startWrite()
public void writeBatch(RequestClass request)
request - public void finishWrite()
public void multiIngest(Kvrpcpb.Context ctx, Object writeResponse) throws RegionException
ctx - writeResponse - RegionExceptionpublic void switchMode(ImportSstpb.SwitchMode mode)
protected ImportSSTGrpc.ImportSSTBlockingStub getBlockingStub()
protected ImportSSTGrpc.ImportSSTFutureStub getAsyncStub()
protected ImportSSTGrpc.ImportSSTStub getStub()
public void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2023 PingCAP. All rights reserved.