Package org.apache.druid.segment.data
Class Offset
- java.lang.Object
-
- org.apache.druid.segment.data.Offset
-
- All Implemented Interfaces:
Cloneable,HotLoopCallee,ReadableOffset
- Direct Known Subclasses:
BitmapOffset,FilteredOffset,QueryableIndexCursorSequenceBuilder.TimestampCheckingOffset,SimpleSettableOffset
@SubclassesMustBePublic public abstract class Offset extends Object implements ReadableOffset, Cloneable
The "mutable" version of a ReadableOffset. Introduces "increment()" and "withinBounds()" methods, which are very similar to "next()" and "hasNext()" on the Iterator interface except increment() does not return a value. This class is not thread-safe, all it's methods, includingreset()andclone(), must be called from a single thread. Annotated withSubclassesMustBePublicbecause Offset occurrences are replaced with a subclass inHistorical1SimpleDoubleAggPooledTopNScannerPrototypeandHistoricalSingleValueDimSelector1SimpleDoubleAggPooledTopNScannerPrototypeduring specialization, and specialized version of those prototypes must be able to any subclass of Offset. This interface is the core "pointer" interface that is used to createColumnValueSelectors over historical segments. It's counterpart for incremental index isIncrementalIndexRowHolder.
-
-
Constructor Summary
Constructors Constructor Description Offset()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Offsetclone()abstract ReadableOffsetgetBaseReadableOffset()Returns the same offset ("this") or a readable "view" of this offset, which always returns the same value fromReadableOffset.getOffset(), as this offset.abstract voidincrement()abstract voidreset()Resets the Offset to the position it was created or cloned with.abstract booleanwithinBounds()-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.monomorphicprocessing.HotLoopCallee
inspectRuntimeShape
-
Methods inherited from interface org.apache.druid.segment.data.ReadableOffset
getOffset
-
-
-
-
Method Detail
-
increment
@CalledFromHotLoop public abstract void increment()
-
withinBounds
@CalledFromHotLoop public abstract boolean withinBounds()
-
reset
public abstract void reset()
Resets the Offset to the position it was created or cloned with.
-
getBaseReadableOffset
public abstract ReadableOffset getBaseReadableOffset()
Returns the same offset ("this") or a readable "view" of this offset, which always returns the same value fromReadableOffset.getOffset(), as this offset. This method is useful for "unwrapping" such offsets asFilteredOffsetand reduce reference indirection, when onlyReadableOffsetAPI is needed.
-
-