Class AbstractHistoryLoader<I>

    • 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()
      • 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)
      • startReading

        public 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 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
      • 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
      • 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 IdentifiedHistoricalValue<I> readNextFromSource()
                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadValue

        protected abstract long loadValue​(IdentifiedHistoricalValue<I> value)
        Puts the value into the appropriate column.