Class SeriesReaderByTimestamp

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object[] getValuesInTimestamps​(long[] timestamps, int length)
      Returns the corresponding value under this timestamp.
      protected boolean hasNext​(long timestamp)  
      boolean readerIsEmpty()
      Returns whether there is no more data in reader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SeriesReaderByTimestamp

        public SeriesReaderByTimestamp​(org.apache.iotdb.commons.path.PartialPath seriesPath,
                                       java.util.Set<java.lang.String> allSensors,
                                       org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType,
                                       QueryContext context,
                                       QueryDataSource dataSource,
                                       TsFileFilter fileFilter,
                                       boolean ascending)
      • SeriesReaderByTimestamp

        public SeriesReaderByTimestamp​(SeriesReader seriesReader,
                                       boolean ascending)
      • SeriesReaderByTimestamp

        public SeriesReaderByTimestamp​(org.apache.iotdb.commons.path.PartialPath seriesPath,
                                       java.util.Set<java.lang.String> allSensors,
                                       org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType,
                                       QueryContext context,
                                       java.util.List<TsFileResource> seqFileResource,
                                       java.util.List<TsFileResource> unseqFileResource,
                                       boolean ascending)
    • Method Detail

      • getValuesInTimestamps

        public java.lang.Object[] getValuesInTimestamps​(long[] timestamps,
                                                        int length)
                                                 throws java.io.IOException
        Description copied from interface: IReaderByTimestamp
        Returns the corresponding value under this timestamp. Returns null if no value under this timestamp.

        Note that calling this method will change the status of this reader irreversibly just like next. The difference is that next moves one step forward while getValueInTimestamp advances towards the given timestamp.

        Attention: DO call this method with monotonically increasing timestamps. There is no guarantee of correctness with any other way of calling. For example, DO NOT call this method twice with the same timestamp.

        Specified by:
        getValuesInTimestamps in interface IReaderByTimestamp
        Throws:
        java.io.IOException
      • readerIsEmpty

        public boolean readerIsEmpty()
                              throws java.io.IOException
        Description copied from interface: IReaderByTimestamp
        Returns whether there is no more data in reader.

        True means no more data. False means you can still get more data

        Specified by:
        readerIsEmpty in interface IReaderByTimestamp
        Throws:
        java.io.IOException
      • hasNext

        protected boolean hasNext​(long timestamp)
                           throws java.io.IOException
        Throws:
        java.io.IOException