Class DefaultHistoryColumn

  • All Implemented Interfaces:
    HistoryColumn, HistoryNode

    public class DefaultHistoryColumn
    extends AbstractHistoryNode
    implements HistoryColumn
    This is the most general-purpose implementation of a history node. It is provided raw values for a given column, and generates block results. It has pluggable support for aggregates, interpolation, and value validation.

    NOTE: This type currently has a large flaw in that it cannot properly handle raw queries. It expects the block size from the controller to be > 1.

    • Constructor Detail

      • DefaultHistoryColumn

        public DefaultHistoryColumn​(java.lang.String name,
                                    QueryController controller)
    • Method Detail

      • setInterpolator

        public void setInterpolator​(Interpolator value)
      • setController

        protected void setController​(QueryController controller)
      • logAggValue

        protected void logAggValue​(long ts,
                                   ProcessedValue v)
      • valueIsProvisional

        protected boolean valueIsProvisional​(@Nullable
                                             ProcessedValue value)
      • valueInterpolated

        protected boolean valueInterpolated​(@Nullable
                                            ProcessedValue v)
      • process

        public void process​(HistoricalValue value)
        This receives a new raw value from the data source and processes it.
        Specified by:
        process in interface HistoryColumn
      • finishAggregationWindow

        protected void finishAggregationWindow()
        Locks in values from previous aggregation window, updates currentBlock value
      • getValue

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