public class SearchChunkResponseParser extends BaseChunkResponseParser<SearchChunkHeader,SearchChunkRow,SearchChunkTrailer>
Constructor and Description |
---|
SearchChunkResponseParser() |
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<SearchChunkHeader> |
header()
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<SearchChunkHeader,SearchChunkRow,SearchChunkTrailer>
protected JsonStreamParser.Builder parserBuilder()
BaseChunkResponseParser
parserBuilder
in class BaseChunkResponseParser<SearchChunkHeader,SearchChunkRow,SearchChunkTrailer>
public Optional<SearchChunkHeader> header()
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.
public Optional<CouchbaseException> error()
ChunkResponseParser
public void signalComplete()
BaseChunkResponseParser
signalComplete
in class BaseChunkResponseParser<SearchChunkHeader,SearchChunkRow,SearchChunkTrailer>
Copyright © 2020 Couchbase, Inc.. All rights reserved.