Class 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.
    • Constructor Detail

      • ProcessedHistoryColumn

        public ProcessedHistoryColumn​(java.lang.String name,
                                      boolean isRaw)
    • Method Detail

      • getValue

        public java.lang.Object getValue​(long timestamp,
                                         int level)
        Specified by:
        getValue in interface HistoryNode
      • 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 interface HistoryNode
      • 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 interface HistoryNode
        Overrides:
        markCompleted in class AbstractHistoryNode
      • 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)
      • 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 interface HistoryNode