Class NonStreamingQueryResults
- java.lang.Object
 - 
- com.inductiveautomation.gateway.tsdb.impl.NonStreamingQueryResults
 
 
- 
- All Implemented Interfaces:
 QueryResult,SyncQueryResults,java.util.Iterator<ResultDataPoint>
public class NonStreamingQueryResults extends java.lang.Object implements SyncQueryResults
An implementation of query result that holds all data in memory. 
- 
- 
Constructor Summary
Constructors Constructor Description NonStreamingQueryResults()NonStreamingQueryResults(long syncId) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddData(PathInfo info, DataPoint data)voidaddData(PathInfo info, java.util.List<DataPoint> data)voidcancel()Cancels the query.java.lang.ExceptiongetError()java.util.List<PathInfo>getPathInfo()Information about the paths queried.longgetSyncId()booleanhasNext()booleanisErrored()protected voidmoveForward()ResultDataPointnext()voidonData(java.util.function.Consumer<DataPoint> consumer, java.util.function.BiConsumer<java.lang.Boolean,java.lang.Throwable> onComplete)voidonError(java.lang.Exception t)voidsetSyncId(long syncId) 
 - 
 
- 
- 
Method Detail
- 
isErrored
public boolean isErrored()
- Specified by:
 isErroredin interfaceQueryResult
 
- 
getError
public java.lang.Exception getError()
- Specified by:
 getErrorin interfaceQueryResult
 
- 
setSyncId
public void setSyncId(long syncId)
 
- 
getPathInfo
public java.util.List<PathInfo> getPathInfo()
Description copied from interface:QueryResultInformation about the paths queried. Corresponds 1-to-1 with the paths passed in when the query was executed.- Specified by:
 getPathInfoin interfaceQueryResult
 
- 
moveForward
protected void moveForward()
 
- 
hasNext
public boolean hasNext()
- Specified by:
 hasNextin interfacejava.util.Iterator<ResultDataPoint>
 
- 
next
public ResultDataPoint next()
- Specified by:
 nextin interfacejava.util.Iterator<ResultDataPoint>
 
- 
onData
public void onData(java.util.function.Consumer<DataPoint> consumer, java.util.function.BiConsumer<java.lang.Boolean,java.lang.Throwable> onComplete)
- Specified by:
 onDatain interfaceQueryResult
 
- 
cancel
public void cancel()
Description copied from interface:QueryResultCancels the query. Will call onComplete immediately, and will no longer process values. If takeNext() is blocked, it will throw an interrupted exception.- Specified by:
 cancelin interfaceQueryResult
 
- 
getSyncId
public long getSyncId()
- Specified by:
 getSyncIdin interfaceSyncQueryResults
 
- 
onError
public void onError(java.lang.Exception t)
 
 - 
 
 -