java.lang.Object
org.elasticsearch.rest.LoggingChunkedRestResponseBody
- All Implemented Interfaces:
ChunkedRestResponseBody
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingChunkedRestResponseBody
(ChunkedRestResponseBody inner, OutputStream loggerStream) -
Method Summary
Modifier and TypeMethodDescriptionencodeChunk
(int sizeHint, Recycler<org.apache.lucene.util.BytesRef> recycler) Serializes approximately as many bytes of the response as request bysizeHint
to aReleasableBytesReference
that is created from buffers backed by the givenrecycler
.boolean
isDone()
-
Constructor Details
-
LoggingChunkedRestResponseBody
-
-
Method Details
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceChunkedRestResponseBody
- Returns:
- true once this response has been written fully.
-
encodeChunk
public ReleasableBytesReference encodeChunk(int sizeHint, Recycler<org.apache.lucene.util.BytesRef> recycler) throws IOException Description copied from interface:ChunkedRestResponseBody
Serializes approximately as many bytes of the response as request bysizeHint
to aReleasableBytesReference
that is created from buffers backed by the givenrecycler
.- Specified by:
encodeChunk
in interfaceChunkedRestResponseBody
- Parameters:
sizeHint
- how many bytes to approximately serialize for the given chunkrecycler
- recycler used to acquire buffers- Returns:
- serialized chunk
- Throws:
IOException
- on serialization failure
-
getResponseContentTypeString
- Specified by:
getResponseContentTypeString
in interfaceChunkedRestResponseBody
- Returns:
- the response Content-Type header value for this response body
-