Package org.apache.druid.server
Class QueryResultPusher.StreamingHttpResponseAccumulator
- java.lang.Object
-
- org.apache.druid.server.QueryResultPusher.StreamingHttpResponseAccumulator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.druid.java.util.common.guava.Accumulator<javax.ws.rs.core.Response,Object>
- Enclosing class:
- QueryResultPusher
public class QueryResultPusher.StreamingHttpResponseAccumulator extends Object implements org.apache.druid.java.util.common.guava.Accumulator<javax.ws.rs.core.Response,Object>, Closeable
-
-
Constructor Summary
Constructors Constructor Description StreamingHttpResponseAccumulator(org.apache.druid.query.context.ResponseContext responseContext, QueryResultPusher.ResultsWriter resultsWriter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Responseaccumulate(javax.ws.rs.core.Response retVal, Object in)voidclose()voidflush()longgetNumBytesSent()voidinitialize()Initializes the response.booleanisInitialized()
-
-
-
Constructor Detail
-
StreamingHttpResponseAccumulator
public StreamingHttpResponseAccumulator(org.apache.druid.query.context.ResponseContext responseContext, QueryResultPusher.ResultsWriter resultsWriter)
-
-
Method Detail
-
getNumBytesSent
public long getNumBytesSent()
-
isInitialized
public boolean isInitialized()
-
initialize
public void initialize()
Initializes the response. This is done lazily so that we can put various metadata that we only get once we have some of the response stream into the result.It is okay for this to be called multiple times.
-
accumulate
@Nullable public javax.ws.rs.core.Response accumulate(javax.ws.rs.core.Response retVal, Object in)
- Specified by:
accumulatein interfaceorg.apache.druid.java.util.common.guava.Accumulator<javax.ws.rs.core.Response,Object>
-
flush
public void flush() throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-