public static interface QueryResultPusher.ResultsWriter extends Closeable
| Modifier and Type | Method and Description |
|---|---|
QueryResponse<Object> |
getQueryResponse()
Gets the results of running the query.
|
QueryResultPusher.Writer |
makeWriter(OutputStream out) |
void |
recordFailure(Exception e) |
void |
recordSuccess(long numBytes) |
javax.ws.rs.core.Response.ResponseBuilder |
start()
Runs the query and prepares the QueryResponse to be returned
|
@Nullable javax.ws.rs.core.Response.ResponseBuilder start()
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.
QueryResponse<Object> getQueryResponse()
start() must be called before this method is called.start() methodQueryResultPusher.Writer makeWriter(OutputStream out) throws IOException
IOExceptionvoid recordSuccess(long numBytes)
void recordFailure(Exception e)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.