public abstract class AbstractHistoryLoader<I> extends java.lang.Object implements HistoryQueryExecutor
Modifier and Type | Field and Description |
---|---|
protected long |
endTime |
protected long |
startTime |
Modifier | Constructor and Description |
---|---|
protected |
AbstractHistoryLoader(QueryController controller) |
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).
|
QueryController |
getController() |
protected long |
getEndTime() |
protected abstract LoggerEx |
getLogger() |
protected java.lang.String |
getQueryId() |
java.util.SortedSet<? extends IdentifiedHistoricalValue<I>> |
getSeedValues() |
protected long |
getStartTime() |
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.
|
protected abstract long |
loadValue(IdentifiedHistoricalValue<I> value)
Puts the value into the appropriate column.
|
long |
nextTime()
The timestamp of the next value.
|
protected java.lang.String |
pathToString(QualifiedPath path) |
protected abstract void |
primeRead()
This function starts the read process, and gets the system ready for the first call to readNextFromSource
|
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 |
readNext()
Primes the nextValue
|
protected abstract IdentifiedHistoricalValue<I> |
readNextFromSource() |
protected void |
setErrored(DataQuality code) |
protected void |
setPostValues(java.util.SortedSet<? extends IdentifiedHistoricalValue<I>> postValues) |
protected void |
setSeedValues(java.util.SortedSet<? extends IdentifiedHistoricalValue<I>> seedValues) |
void |
startReading()
Executes query to begin data read.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumnNodes, getEffectiveWindowSizeMS
protected AbstractHistoryLoader(QueryController controller)
protected java.lang.String getQueryId()
public QueryController getController()
protected abstract LoggerEx getLogger()
protected long getStartTime()
protected long getEndTime()
protected java.lang.String pathToString(QualifiedPath path)
public void initialize() throws java.lang.Exception
HistoryQueryExecutor
initialize
in interface HistoryQueryExecutor
java.lang.Exception
protected void setErrored(DataQuality code)
public java.util.SortedSet<? extends IdentifiedHistoricalValue<I>> getSeedValues()
protected void setSeedValues(java.util.SortedSet<? extends IdentifiedHistoricalValue<I>> seedValues)
protected void setPostValues(java.util.SortedSet<? extends IdentifiedHistoricalValue<I>> postValues)
public void startReading() throws java.lang.Exception
startReading
in interface HistoryQueryExecutor
java.lang.Exception
protected abstract void primeRead() throws java.lang.Exception
java.lang.Exception
public void endReading()
HistoryQueryExecutor
endReading
in interface HistoryQueryExecutor
public boolean hasMore()
HistoryQueryExecutor
hasMore
in interface HistoryQueryExecutor
public long nextTime()
HistoryQueryExecutor
nextTime
in interface HistoryQueryExecutor
public long processData() throws java.lang.Exception
HistoryQueryExecutor
processData
in interface HistoryQueryExecutor
java.lang.Exception
protected void readNext() throws java.lang.Exception
java.lang.Exception
protected abstract IdentifiedHistoricalValue<I> readNextFromSource() throws java.lang.Exception
java.lang.Exception
protected abstract long loadValue(IdentifiedHistoricalValue<I> value)
value
-