Class AbstractHistoryNode
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
-
- All Implemented Interfaces:
HistoryNode
- Direct Known Subclasses:
DefaultHistoryColumn
,ErrorHistoryColumn
,HistoryColumn
,ProcessedHistoryColumn
public abstract class AbstractHistoryNode extends java.lang.Object implements HistoryNode
The AbstractHistoryNode implements the linked-list management for HistoryNodes. As long as sub-classes call setNextAvailableTime() when their values are updated, the node ordering will be maintained.
-
-
Field Summary
Fields Modifier and Type Field Description protected DataTypeClass
type
-
Constructor Summary
Constructors Constructor Description AbstractHistoryNode(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTypeClass
getDataType()
QualityCode
getErrorCode()
java.lang.String
getName()
HistoryNode
getNext()
HistoryNode
getPrevious()
boolean
isErrored()
void
markCompleted(long time)
Tells the node that the data up to and including the specified time is no longer needed.long
maxAvailableTime()
Returns the MAX time that this column has values for.void
setDataType(DataTypeClass type)
void
setErrored(QualityCode code)
void
setNext(HistoryNode node)
protected void
setNextAvailableTime(long time)
void
setPrevious(HistoryNode node)
protected static void
sortNode(HistoryNode node)
protected static void
swapNodes(HistoryNode a, HistoryNode b)
-
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
getQuality, getValue, hasMore, wasValueInterpolated
-
-
-
-
Field Detail
-
type
protected DataTypeClass type
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceHistoryNode
-
getDataType
public DataTypeClass getDataType()
- Specified by:
getDataType
in interfaceHistoryNode
-
setDataType
public void setDataType(DataTypeClass type)
-
isErrored
public boolean isErrored()
-
setErrored
public void setErrored(QualityCode code)
-
getErrorCode
public QualityCode getErrorCode()
-
maxAvailableTime
public long maxAvailableTime()
Description copied from interface:HistoryNode
Returns the MAX time that this column has values for. NOTE: the max time can be well in the future (compared to the last value time). In fact, columns that don't interpolate data could return long.maxvalue. This time simply means "if you call getValue with a time less than this time, I can give you a value".- Specified by:
maxAvailableTime
in interfaceHistoryNode
-
setNextAvailableTime
protected void setNextAvailableTime(long time)
-
getNext
public HistoryNode getNext()
- Specified by:
getNext
in interfaceHistoryNode
-
setNext
public void setNext(HistoryNode node)
- Specified by:
setNext
in interfaceHistoryNode
-
getPrevious
public HistoryNode getPrevious()
- Specified by:
getPrevious
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
-
setPrevious
public void setPrevious(HistoryNode node)
- Specified by:
setPrevious
in interfaceHistoryNode
-
sortNode
protected static void sortNode(HistoryNode node)
-
swapNodes
protected static void swapNodes(HistoryNode a, HistoryNode b)
-
-