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 byRowBasedStorageAdapter
andRowBasedCursor
to walk through rows. It allows multipleRowBasedCursor
to 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 therowSequence
and 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 void
advance()
void
close()
T
currentRow()
boolean
isDone()
void
reset()
void
skipToDateTime(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-