Class BatchedQueryResult

java.lang.Object
java.util.concurrent.CompletableFuture<List<Row>>
io.confluent.ksql.api.client.BatchedQueryResult
All Implemented Interfaces:
CompletionStage<List<Row>>, Future<List<Row>>

public abstract class BatchedQueryResult extends CompletableFuture<List<Row>>
The result of a query (push or pull), returned as a single batch once the query has finished executing, or the query has been terminated. For non-terminating push queries, StreamedQueryResult should be used instead.

If a non-200 response is received from the server, this future will complete exceptionally.

The maximum number of Rows that may be returned from a BatchedQueryResult defaults to ClientOptions.DEFAULT_EXECUTE_QUERY_MAX_RESULT_ROWS and can be configured via ClientOptions.setExecuteQueryMaxResultRows(int).

  • Constructor Details

    • BatchedQueryResult

      public BatchedQueryResult()
  • Method Details

    • queryID

      public abstract CompletableFuture<String> queryID()
      Returns a CompletableFuture containing the ID of the underlying query if the query is a push query, else null. The future is completed once a response is received from the server.

      If a non-200 response is received from the server, this future will complete exceptionally.

      Returns:
      a future containing the query ID (or null in the case of pull queries)