Package org.apache.hadoop.hbase.client
Interface ServiceCaller<S,R>
- Type Parameters:
S
- the type of the protobuf Service you want to call.R
- the type of the return value.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Delegate to a protobuf rpc call.
Usually, it is just a simple lambda expression, like:
(stub, controller, rpcCallback) -> { XXXRequest request = ...; // prepare the request stub.xxx(controller, request, rpcCallback); }And if already have the
request
, the lambda expression will be:
(stub, controller, rpcCallback) -> stub.xxx(controller, request, rpcCallback)
-
Method Summary
-
Method Details
-
call
void call(S stub, com.google.protobuf.RpcController controller, com.google.protobuf.RpcCallback<R> rpcCallback) Represent the actual protobuf rpc call.- Parameters:
stub
- the asynchronous stubcontroller
- the rpc controller, has already been prepared for yourpcCallback
- the rpc callback, has already been prepared for you
-