public class AggregateHistoryQueryExecutor extends java.lang.Object implements HistoryQueryExecutor, java.util.Comparator<HistoryQueryExecutor>
Constructor and Description |
---|
AggregateHistoryQueryExecutor(java.util.Collection<? extends HistoryQueryExecutor> allLoaders,
java.util.List<HistoryNode> nodes,
java.lang.Runnable onFinish) |
Modifier and Type | Method and Description |
---|---|
int |
compare(HistoryQueryExecutor o1,
HistoryQueryExecutor o2) |
static HistoryQueryExecutor |
create(java.util.List<HistoryQueryExecutor> executors,
java.util.List<HistoryNode> nodes)
Convenience function that will create an aggregate executor if necessary, or return the single passed in executor
if the list size is 1.
|
static HistoryQueryExecutor |
create(java.util.List<HistoryQueryExecutor> executors,
java.util.List<HistoryNode> nodes,
java.lang.Runnable onFinish) |
protected HistoryQueryExecutor |
current() |
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()
In this context, returns the minimum of the sub-loaders rates.
|
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.
|
protected void |
sort()
This ensures the the next loader to read from is in the head spot.
|
void |
startReading()
Begins reading data.
|
public AggregateHistoryQueryExecutor(java.util.Collection<? extends HistoryQueryExecutor> allLoaders, java.util.List<HistoryNode> nodes, java.lang.Runnable onFinish)
public static HistoryQueryExecutor create(java.util.List<HistoryQueryExecutor> executors, java.util.List<HistoryNode> nodes)
public static HistoryQueryExecutor create(java.util.List<HistoryQueryExecutor> executors, java.util.List<HistoryNode> nodes, java.lang.Runnable onFinish)
protected HistoryQueryExecutor current()
public java.util.List<? extends HistoryNode> getColumnNodes()
HistoryQueryExecutor
DelegatingHistoryNode
s, which get filled in later.getColumnNodes
in interface HistoryQueryExecutor
public int getEffectiveWindowSizeMS()
getEffectiveWindowSizeMS
in interface HistoryQueryExecutor
public void initialize() throws java.lang.Exception
HistoryQueryExecutor
initialize
in interface HistoryQueryExecutor
java.lang.Exception
public void startReading() throws java.lang.Exception
HistoryQueryExecutor
startReading
in interface HistoryQueryExecutor
java.lang.Exception
public void endReading()
HistoryQueryExecutor
endReading
in interface HistoryQueryExecutor
public boolean hasMore()
HistoryQueryExecutor
hasMore
in interface HistoryQueryExecutor
public long processData() throws java.lang.Exception
HistoryQueryExecutor
processData
in interface HistoryQueryExecutor
java.lang.Exception
public long nextTime()
HistoryQueryExecutor
nextTime
in interface HistoryQueryExecutor
protected void sort()
public int compare(HistoryQueryExecutor o1, HistoryQueryExecutor o2)
compare
in interface java.util.Comparator<HistoryQueryExecutor>