Class AbstractHistoryLoader<V>

    • Field Detail

      • startTime

        protected long startTime
      • endTime

        protected long endTime
    • Constructor Detail

      • AbstractHistoryLoader

        protected AbstractHistoryLoader​(QueryController controller)
    • Method Detail

      • getQueryId

        protected java.lang.String getQueryId()
      • getLogger

        protected abstract LoggerEx getLogger()
      • getStartTime

        protected long getStartTime()
      • getEndTime

        protected long getEndTime()
      • shouldReadBoundaryValues

        protected boolean shouldReadBoundaryValues()
        Helper function to determine whether bounding values should be read.
      • pathToString

        protected java.lang.String pathToString​(QualifiedPath path)
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Description copied from interface: HistoryQueryExecutor
        Initializes the query, performing any actions necessary to get the information required to run the query.
        Specified by:
        initialize in interface HistoryQueryExecutor
        Throws:
        java.lang.Exception
      • setErrored

        protected void setErrored​(DataQuality code)
      • getSeedValues

        public java.util.List<? extends V> getSeedValues()
      • setSeedValues

        protected void setSeedValues​(java.util.List<? extends V> seedValues)
      • setPostValues

        protected void setPostValues​(java.util.List<? extends V> postValues)
      • startReading

        public final void startReading()
                                throws java.lang.Exception
        Executes query to begin data read. Important: endRead should be called in finally block of invoking method.
        Specified by:
        startReading in interface HistoryQueryExecutor
        Throws:
        java.lang.Exception
      • primeRead

        protected abstract void primeRead()
                                   throws java.lang.Exception
        This function starts the read process, and gets the system ready for the first call to readNextFromSource
        Throws:
        java.lang.Exception
      • endReading

        public final void endReading()
        Description copied from interface: HistoryQueryExecutor
        If startReading was called, this function must be called (that is, it should be in a finally block).
        Specified by:
        endReading in interface HistoryQueryExecutor
      • closeRead

        protected abstract void closeRead()
        The reading has been ended, clean up any resources.
      • hasMore

        public boolean hasMore()
        Description copied from interface: HistoryQueryExecutor
        Returns TRUE if there is more data available to be written on call to processData()
        Specified by:
        hasMore in interface HistoryQueryExecutor
      • getTimestampFor

        protected abstract long getTimestampFor​(V value)
      • processData

        public long processData()
                         throws java.lang.Exception
        Description copied from interface: HistoryQueryExecutor
        Puts the next value(s) into the appropriate column, returning the latest timestamp loaded, or -1 if no data was loaded.
        Specified by:
        processData in interface HistoryQueryExecutor
        Throws:
        java.lang.Exception
      • readNext

        protected void readNext()
                         throws java.lang.Exception
        Primes the nextValue
        Throws:
        java.lang.Exception
      • readNextFromSource

        protected abstract V readNextFromSource()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadValue

        protected abstract long loadValue​(V value)
        Puts the value into the appropriate column.