Class AggrWindowIterator

  • All Implemented Interfaces:
    ITimeRangeIterator

    public class AggrWindowIterator
    extends java.lang.Object
    implements ITimeRangeIterator
    This class iteratively generates aggregated time windows.

    For example, startTime = 0, endTime = 10, interval = 5, slidingStep = 3, leftCloseRightOpen, return [0,5],[3,7],[6,9],[9,9]

    • Constructor Summary

      Constructors 
      Constructor Description
      AggrWindowIterator​(long startTime, long endTime, long interval, long slidingStep, boolean isAscending, boolean isSlidingStepByMonth, boolean isIntervalByMonth, boolean leftCRightO)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long currentOutputTime()
      As there is only one timestamp can be output for a time range, this method will return the output time based on leftCloseRightOpen or not.
      org.apache.iotdb.tsfile.read.common.TimeRange getFirstTimeRange()
      return the first time range by sorting order
      long getTotalIntervalNum()  
      boolean hasNextTimeRange()  
      boolean isAscending()  
      org.apache.iotdb.tsfile.read.common.TimeRange nextTimeRange()
      return the next time range according to curStartTime (the start time of the last returned time range)
      void reset()  
      • Methods inherited from class java.lang.Object

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

      • AggrWindowIterator

        public AggrWindowIterator​(long startTime,
                                  long endTime,
                                  long interval,
                                  long slidingStep,
                                  boolean isAscending,
                                  boolean isSlidingStepByMonth,
                                  boolean isIntervalByMonth,
                                  boolean leftCRightO)
    • Method Detail

      • hasNextTimeRange

        public boolean hasNextTimeRange()
        Specified by:
        hasNextTimeRange in interface ITimeRangeIterator
        Returns:
        whether current iterator has next time range
      • nextTimeRange

        public org.apache.iotdb.tsfile.read.common.TimeRange nextTimeRange()
        Description copied from interface: ITimeRangeIterator
        return the next time range according to curStartTime (the start time of the last returned time range)
        Specified by:
        nextTimeRange in interface ITimeRangeIterator
      • currentOutputTime

        public long currentOutputTime()
        Description copied from interface: ITimeRangeIterator
        As there is only one timestamp can be output for a time range, this method will return the output time based on leftCloseRightOpen or not.
        Specified by:
        currentOutputTime in interface ITimeRangeIterator
        Returns:
        minTime if leftCloseRightOpen, else maxTime.
      • reset

        public void reset()