Interface QueryResultPusher.ResultsWriter

    • Method Detail

      • start

        @Nullable
        javax.ws.rs.core.Response.ResponseBuilder start()
        Runs the query and prepares the QueryResponse to be returned

        This also serves as a hook for any logic that runs on the metadata from a QueryResponse. If this method returns null then the Pusher can continue with normal logic. If this method chooses to return a ResponseBuilder, then the Pusher will attach any extra metadata it has to the Response and return the response built from the Builder without attempting to process the results of the query.

        In all cases, Closeable.close() should be called on this object.

        Returns:
        QueryResponse or null if no more work to do.
      • getQueryResponse

        QueryResponse<Object> getQueryResponse()
        Gets the results of running the query. start() must be called before this method is called.
        Returns:
        the results of running the query as prepared by the start() method
      • recordSuccess

        void recordSuccess​(long numBytes)
      • recordFailure

        void recordFailure​(Exception e)