public class QueryChunkResponseParser extends BaseChunkResponseParser<QueryChunkHeader,QueryChunkRow,QueryChunkTrailer>
Constructor and Description |
---|
QueryChunkResponseParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
doCleanup()
Give subclasses a chance to reset their state.
|
Optional<CouchbaseException> |
error()
If the parser sees an error, it should fill this optional so that if the IO
layer needs to fail the topmost future it will be passed in.
|
Optional<QueryChunkHeader> |
header(boolean lastChunk)
Once the header is completely available, returns a non-absent value of it.
|
protected JsonStreamParser.Builder |
parserBuilder()
Subclass implements this to return the "meat" of the decoding, the chunk parser.
|
void |
signalComplete()
Called when the JSON stream has been parsed completely and successfully.
|
cleanup, completeRows, completeTrailer, decodingFailure, emitRow, endOfInput, failRows, feed, initialize, isHeaderComplete, markHeaderComplete, requestContext, responseHeader, rows, trailer, updateRequestContext, updateResponseHeader
protected void doCleanup()
BaseChunkResponseParser
doCleanup
in class BaseChunkResponseParser<QueryChunkHeader,QueryChunkRow,QueryChunkTrailer>
protected JsonStreamParser.Builder parserBuilder()
BaseChunkResponseParser
parserBuilder
in class BaseChunkResponseParser<QueryChunkHeader,QueryChunkRow,QueryChunkTrailer>
public Optional<QueryChunkHeader> header(boolean lastChunk)
ChunkResponseParser
It is important to provide a non-absent value even if some parts are optional because the related IO components will only proceed if a header is available eventually.
lastChunk
- if we are currently parsing the last chunk.public Optional<CouchbaseException> error()
ChunkResponseParser
public void signalComplete()
BaseChunkResponseParser
signalComplete
in class BaseChunkResponseParser<QueryChunkHeader,QueryChunkRow,QueryChunkTrailer>
Copyright © 2020 Couchbase, Inc.. All rights reserved.