public List<Result> call(IndexCoprocessorInMemService instance) throws IOException {
    ServerRpcController controller = new ServerRpcController();
    BlockingRpcCallback<IndexedQueryResponse> rpcCallback =
        new BlockingRpcCallback<IndexedQueryResponse>();
    instance.execIndexedQuery(controller, indexQuery, rpcCallback);

    IndexedQueryResponse response = rpcCallback.get();
    if (controller.failedOnException()) {
      throw controller.getFailedOn();
    }

    if (response.getResultCount() > 0) {
      List<ProtoResult> protoResultList = response.getResultList();
      List<Result> result; // = new ArrayList<Result>(protoResultList.size());
      result = Util.toResults(protoResultList);

      return result;
    }
    return new ArrayList<Result>(0);
  }
 public IndexedQueryCallable(IndexedColumnQuery query) throws InvalidQueryException {
   indexQuery = Util.buildQuery(query);
 }