public class BasicQueryResult extends java.lang.Object implements QueryResult, ResultPublisher
Constructor and Description |
---|
BasicQueryResult()
If this constructor is used, setPathInfo must be called later.
|
BasicQueryResult(java.util.List<PathInfo> pathInfos) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the query.
|
void |
finish() |
protected void |
finishInternal(java.lang.Exception ex) |
void |
finishWithError(java.lang.Exception e) |
java.lang.Exception |
getError() |
java.util.List<PathInfo> |
getPathInfo() |
boolean |
hasNext() |
boolean |
isCanceled() |
boolean |
isErrored() |
ResultDataPoint |
next() |
void |
onData(java.util.function.Consumer<DataPoint> consumer,
java.util.function.BiConsumer<java.lang.Boolean,java.lang.Throwable> onComplete) |
void |
publish(ResultDataPoint point) |
protected void |
setPathInfo(java.util.List<PathInfo> pathInfo)
Sets the path info and releases the lock on getPathInfos.
|
public BasicQueryResult()
public BasicQueryResult(java.util.List<PathInfo> pathInfos)
public boolean isErrored()
isErrored
in interface QueryResult
public java.lang.Exception getError()
getError
in interface QueryResult
public java.util.List<PathInfo> getPathInfo()
getPathInfo
in interface QueryResult
protected void setPathInfo(java.util.List<PathInfo> pathInfo)
public boolean hasNext()
hasNext
in interface java.util.Iterator<ResultDataPoint>
public boolean isCanceled()
isCanceled
in interface ResultPublisher
public ResultDataPoint next()
next
in interface java.util.Iterator<ResultDataPoint>
public void onData(java.util.function.Consumer<DataPoint> consumer, java.util.function.BiConsumer<java.lang.Boolean,java.lang.Throwable> onComplete)
onData
in interface QueryResult
public void cancel()
QueryResult
cancel
in interface QueryResult
public void publish(ResultDataPoint point)
publish
in interface ResultPublisher
protected void finishInternal(java.lang.Exception ex)
public void finish()
finish
in interface ResultPublisher
public void finishWithError(java.lang.Exception e)
finishWithError
in interface ResultPublisher