Interface QueryResult
-
- All Superinterfaces:
java.util.Iterator<ResultDataPoint>
- All Known Subinterfaces:
SyncQueryResults
- All Known Implementing Classes:
BasicQueryResult
,BasicSyncQueryResults
,FixedDailyDataHistorian.DataPump
,NonStreamingQueryResults
,SQLiteHistorian.Query
public interface QueryResult extends java.util.Iterator<ResultDataPoint>
The results of a TSDB query. It is designed to provide values in a streaming fashion, either through a producer-consumer model with next(), or an async consumer model by using onData(Consumer).
Important: Only one of the two models can be used at a time. Attempting to call next() after setting a data consumer, or viceversa, will result in an IllegalStateException.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
Cancels the query.java.lang.Exception
getError()
java.util.List<PathInfo>
getPathInfo()
Information about the paths queried.boolean
isErrored()
void
onData(java.util.function.Consumer<DataPoint> consumer, java.util.function.BiConsumer<java.lang.Boolean,java.lang.Throwable> onComplete)
-
-
-
Method Detail
-
getPathInfo
java.util.List<PathInfo> getPathInfo()
Information about the paths queried. Corresponds 1-to-1 with the paths passed in when the query was executed.
-
isErrored
boolean isErrored()
-
getError
java.lang.Exception getError()
-
onData
void onData(java.util.function.Consumer<DataPoint> consumer, java.util.function.BiConsumer<java.lang.Boolean,java.lang.Throwable> onComplete)
-
cancel
void cancel()
Cancels the query. Will call onComplete immediately, and will no longer process values. If takeNext() is blocked, it will throw an interrupted exception.
-
-