Class ByTimestampReaderAdapter

  • All Implemented Interfaces:
    IReaderByTimestamp

    public class ByTimestampReaderAdapter
    extends java.lang.Object
    implements IReaderByTimestamp
    This class is an adapter which makes IPointReader implement IReaderByTimestamp interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      ByTimestampReaderAdapter​(org.apache.iotdb.tsfile.read.reader.IPointReader pointReader)  
    • 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.
      • Methods inherited from class java.lang.Object

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

      • ByTimestampReaderAdapter

        public ByTimestampReaderAdapter​(org.apache.iotdb.tsfile.read.reader.IPointReader pointReader)
    • 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