Class ProcessedHistoryColumn
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
-
- com.inductiveautomation.ignition.gateway.sqltags.history.query.columns.ProcessedHistoryColumn
-
- All Implemented Interfaces:
HistoryColumn
,HistoryNode
- Direct Known Subclasses:
DSRawHistoryColumn
public class ProcessedHistoryColumn extends AbstractHistoryNode implements HistoryColumn
This class is a history node that holds and provides values that are already processed based on our query parameters. The behavior of maxAvailableTime() is dependent on whether or not the column represents "raw" data. If the column is "raw data", the maxAvailableTime will be limited to the earliest datapoint time, with the expectation that all raw values will be written as soon as possible. The raw points will only be trimmed as markCompleted() is called. If the column does not represent raw data, maxAvailableTime() will truely be the maximum time available.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ProcessedHistoryColumn.QV
-
Field Summary
Fields Modifier and Type Field Description protected ProcessedHistoryColumn.QV
lockedQV
protected long
lockedTime
-
Fields inherited from class com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
type
-
-
Constructor Summary
Constructors Constructor Description ProcessedHistoryColumn(java.lang.String name, boolean isRaw)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ProcessedHistoryColumn.QV
find(long timestamp, boolean including)
long
getNextTimestamp()
Returns the next timestamp.QualityCode
getQuality()
Gets the quality that corresponds to the last call to getValuejava.lang.Object
getValue(long timestamp, int level)
boolean
hasMore()
Indicates whether the node has more data for the last time used with getValue.void
markCompleted(long time)
Tells the node that the data up to and including the specified time is no longer needed.void
process(HistoricalValue value)
void
put(QualifiedValue qv)
protected void
put(java.lang.Object value, QualityCode quality, long blockTime)
Adds the value to the internal linked list and sets the next available time to the timestamp, if not in raw mode (if raw mode, sets it if it's the the first node)void
put(java.util.List<QualifiedValue> values)
boolean
wasValueInterpolated()
Returns whether the the last value provided by getValue was purely interpolated- not based on any actual data.-
Methods inherited from class com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
getDataType, getErrorCode, getName, getNext, getPrevious, isErrored, maxAvailableTime, setDataType, setErrored, setNext, setNextAvailableTime, setPrevious, sortNode, swapNodes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.gateway.sqltags.history.query.HistoryNode
getDataType, getName, getNext, getPrevious, maxAvailableTime, setNext, setPrevious
-
-
-
-
Field Detail
-
lockedQV
protected ProcessedHistoryColumn.QV lockedQV
-
lockedTime
protected long lockedTime
-
-
Method Detail
-
getValue
public java.lang.Object getValue(long timestamp, int level)
- Specified by:
getValue
in interfaceHistoryNode
-
getQuality
public QualityCode getQuality()
Description copied from interface:HistoryNode
Gets the quality that corresponds to the last call to getValue- Specified by:
getQuality
in interfaceHistoryNode
-
wasValueInterpolated
public boolean wasValueInterpolated()
Description copied from interface:HistoryNode
Returns whether the the last value provided by getValue was purely interpolated- not based on any actual data.- Specified by:
wasValueInterpolated
in interfaceHistoryNode
-
markCompleted
public void markCompleted(long time)
Description copied from interface:HistoryNode
Tells the node that the data up to and including the specified time is no longer needed. The node should potentially update its maxAvailableTime and sort itself in the list.- Specified by:
markCompleted
in interfaceHistoryNode
- Overrides:
markCompleted
in classAbstractHistoryNode
-
put
public void put(java.util.List<QualifiedValue> values)
-
put
protected void put(java.lang.Object value, QualityCode quality, long blockTime)
Adds the value to the internal linked list and sets the next available time to the timestamp, if not in raw mode (if raw mode, sets it if it's the the first node)
-
put
public void put(QualifiedValue qv)
-
process
public void process(HistoricalValue value)
- Specified by:
process
in interfaceHistoryColumn
-
find
protected ProcessedHistoryColumn.QV find(long timestamp, boolean including)
-
getNextTimestamp
public long getNextTimestamp()
Returns the next timestamp. Long.MAXVALUE means no data.
-
hasMore
public boolean hasMore()
Description copied from interface:HistoryNode
Indicates whether the node has more data for the last time used with getValue.- Specified by:
hasMore
in interfaceHistoryNode
-
-