Package org.apache.druid.segment
Class RowWalker<T>
- java.lang.Object
-
- org.apache.druid.segment.RowWalker<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class RowWalker<T> extends Object implements Closeable
Used byRowBasedStorageAdapterandRowBasedCursorto walk through rows. It allows multipleRowBasedCursorto share the same underlying Iterable. The class creates a yielder from the sequence to iterate over the rows. However, it doesn't call the sequence's close after iterating over it.close()should be called by the instantiators of the class to clear the resources held by therowSequenceand the corresponding yielder created to iterate over it.
-
-
Constructor Summary
Constructors Constructor Description RowWalker(Sequence<T> rowSequence, RowAdapter<T> rowAdapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadvance()voidclose()TcurrentRow()booleanisDone()voidreset()voidskipToDateTime(org.joda.time.DateTime timestamp, boolean descending)
-
-
-
Constructor Detail
-
RowWalker
public RowWalker(Sequence<T> rowSequence, RowAdapter<T> rowAdapter)
-
-
Method Detail
-
isDone
public boolean isDone()
-
currentRow
public T currentRow()
-
advance
public void advance()
-
reset
public void reset()
-
skipToDateTime
public void skipToDateTime(org.joda.time.DateTime timestamp, boolean descending)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-