public interface HistoryQueryExecutor
The processData call is allowed to process as much as it wants, but the idea is that it should only process the minimum necessary, to minimize the memory overhead of the query. After each process, the query executor will examine the columns for processed values, and write a result row to the streaming dataset, if possible.
When no more data is available (or the query is canceled), endReading will be called to clean up resources.
Modifier and Type | Method and Description |
---|---|
void |
endReading()
If startReading was called, this function must be called (that is, it should be in a finally
block).
|
java.util.List<? extends HistoryNode> |
getColumnNodes()
Returns the HistoryNodes of this executor.
|
int |
getEffectiveWindowSizeMS()
When "natural" results are requested, this will be called to let the query executors say what they think
"natural" means.
|
boolean |
hasMore()
Returns TRUE if there is more data available to be written on call to processData()
|
void |
initialize()
Initializes the query, performing any actions necessary to get the information required to run the query.
|
long |
nextTime()
The timestamp of the next value.
|
long |
processData()
Puts the next value(s) into the appropriate column, returning the latest timestamp loaded, or -1 if no data was
loaded.
|
void |
startReading()
Begins reading data.
|
void initialize() throws java.lang.Exception
java.lang.Exception
java.util.List<? extends HistoryNode> getColumnNodes()
DelegatingHistoryNode
s, which get filled in later.int getEffectiveWindowSizeMS()
void startReading() throws java.lang.Exception
java.lang.Exception
void endReading()
boolean hasMore()
long nextTime()
long processData() throws java.lang.Exception
java.lang.Exception