public class YasjlQueryResponseParser extends Object
yasjl based query response parser
Modifier and Type | Field and Description |
---|---|
protected static Charset |
CHARSET |
protected CouchbaseRequest |
currentRequest
Represents the current request
|
protected boolean |
initialized
Flag to indicate if the parser is initialized
|
protected UnicastAutoReleaseSubject<ByteBuf> |
queryErrorObservable
Represents an observable that sends errors and warnings if any during query execution.
|
protected UnicastAutoReleaseSubject<ByteBuf> |
queryInfoObservable
Represents an observable containing metrics on a terminated query.
|
protected UnicastAutoReleaseSubject<ByteBuf> |
queryRowObservable
Represents an observable that sends result chunks.
|
protected UnicastAutoReleaseSubject<ByteBuf> |
querySignatureObservable
Represents an observable that has the signature of the N1QL results if there are any.
|
protected rx.subjects.AsyncSubject<String> |
queryStatusObservable
Represent an observable that has the final execution status of the query, once all result rows and/or errors/warnings have been sent.
|
protected GenericQueryResponse |
response
Response that should be returned on parse call
|
protected ByteBuf |
responseContent |
protected rx.Scheduler |
scheduler
Scheduler for query response
|
protected ResponseStatus |
status
Response status
|
protected long |
ttl
TTL for response observables
|
Constructor and Description |
---|
YasjlQueryResponseParser(rx.Scheduler scheduler,
long ttl) |
Modifier and Type | Method and Description |
---|---|
void |
finishParsingAndReset() |
void |
initialize(ByteBuf responseContent,
ResponseStatus responseStatus) |
boolean |
isInitialized() |
GenericQueryResponse |
parse(boolean lastChunk) |
protected static final Charset CHARSET
protected ByteBuf responseContent
protected UnicastAutoReleaseSubject<ByteBuf> queryRowObservable
Represents an observable that sends result chunks.
protected UnicastAutoReleaseSubject<ByteBuf> querySignatureObservable
Represents an observable that has the signature of the N1QL results if there are any.
protected UnicastAutoReleaseSubject<ByteBuf> queryErrorObservable
Represents an observable that sends errors and warnings if any during query execution.
protected rx.subjects.AsyncSubject<String> queryStatusObservable
Represent an observable that has the final execution status of the query, once all result rows and/or errors/warnings have been sent.
protected UnicastAutoReleaseSubject<ByteBuf> queryInfoObservable
Represents an observable containing metrics on a terminated query.
protected CouchbaseRequest currentRequest
Represents the current request
protected rx.Scheduler scheduler
Scheduler for query response
protected long ttl
TTL for response observables
protected ResponseStatus status
Response status
protected boolean initialized
Flag to indicate if the parser is initialized
protected GenericQueryResponse response
Response that should be returned on parse call
public YasjlQueryResponseParser(rx.Scheduler scheduler, long ttl)
public boolean isInitialized()
public void initialize(ByteBuf responseContent, ResponseStatus responseStatus)
public GenericQueryResponse parse(boolean lastChunk) throws Exception
Exception
public void finishParsingAndReset()
Copyright © 2017 Couchbase, Inc.. All rights reserved.