docs: @Override
    public void query(final Query query, final int chunkSize, final BiConsumer<Cancellable, QueryResult> onNext,
                      final Runnable onComplete, final Consumer<Throwable> onFailure) {
  
      Call<ResponseBody> call;
      if (query instanceof BoundParameterQuery) {
        BoundParameterQuery boundParameterQuery = (BoundParameterQuery) query;
        call = this.influxDBService.query(query.getDatabase(), query.getCommandWithUrlEncoded(), chunkSize,
            boundParameterQuery.getParameterJsonWithUrlEncoded());
      } else {
        call = this.influxDBService.query(query.getDatabase(), query.getCommandWithUrlEncoded(), chunkSize);
      }
  
      call.enqueue(new Callback<ResponseBody>() {
        @Override
        public void onResponse(final Call<ResponseBody> call, final Response<ResponseBody> response) {
  
          Cancellable cancellable = new Cancellable() {
            @Override
            public void cancel() {
              call.cancel();
            }
  
            @Override
            public boolean isCanceled() {
              return call.isCanceled();
            }
          };
  
          try {
            if (response.isSuccessful()) {
              ResponseBody chunkedBody = response.body();
              chunkProccesor.process(chunkedBody, cancellable, onNext, onComplete);
            } else {
              // REVIEW: must be handled consistently with IOException.
              ResponseBody errorBody = response.errorBody();
              if (errorBody != null) {
                InfluxDBException influxDBException = new InfluxDBException(errorBody.string());
                if (onFailure == null) {
                  throw influxDBException;
                } else {
                  onFailure.accept(influxDBException);
                }
              }
            }
          } catch (IOException e) {
            QueryResult queryResult = new QueryResult();
            queryResult.setError(e.toString());
            onNext.accept(cancellable, queryResult);
            //passing null onFailure consumer is here for backward compatibility
            //where the empty queryResult containing error is propagating into onNext consumer
            if (onFailure != null) {
              onFailure.accept(e);
            }
          }
        }
  
        @Override
        public void onFailure(final Call<ResponseBody> call, final Throwable t) {
          if (onFailure == null) {
            throw new InfluxDBException(t);
          } else {
            onFailure.accept(t);
          }
        }
      });
    }