@Override
        public void request(String rpcMethod, CompressionType compression, int uncompressedLength, byte[] compressedPayload,
                            ResponseReceiver responseReceiver, double timeoutSeconds) {
            Request request = new Request(rpcMethod);
            request.parameters().add(new Int8Value(compression.getCode()));
            request.parameters().add(new Int32Value(uncompressedLength));
            request.parameters().add(new DataValue(compressedPayload));

            invokeAsync(request, timeoutSeconds, new RpcProtobufResponseWaiter(this, responseReceiver));
        }
A client which uses rpc request to search nodes to implement the Client API.

@author bratseth
container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcClient.java