@InterfaceAudience.Public @FunctionalInterface public static interface RawAsyncTable.CoprocessorCallable<S,R>
Usually, it is just a simple lambda expression, like:
(stub, controller, rpcCallback) -> {
XXXRequest request = ...; // prepare the request
stub.xxx(controller, request, rpcCallback);
}
And if you can prepare the request
before calling the coprocessorService method, the
lambda expression will be:
(stub, controller, rpcCallback) -> stub.xxx(controller, request, rpcCallback)
Modifier and Type | Method and Description |
---|---|
void |
call(S stub,
com.google.protobuf.RpcController controller,
com.google.protobuf.RpcCallback<R> rpcCallback)
Represent the actual protobuf rpc call.
|
void call(S stub, com.google.protobuf.RpcController controller, com.google.protobuf.RpcCallback<R> rpcCallback)
stub
- the asynchronous stubcontroller
- the rpc controller, has already been prepared for yourpcCallback
- the rpc callback, has already been prepared for youCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.