Package org.apache.druid.segment
Class FilteredOffset
- java.lang.Object
-
- org.apache.druid.segment.data.Offset
-
- org.apache.druid.segment.FilteredOffset
-
- All Implemented Interfaces:
Cloneable,HotLoopCallee,ReadableOffset
public final class FilteredOffset extends Offset
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Offsetclone()clone() is not supported by FilteredOffset because it's not possible to clonefilterMatcher, and while re-creating filterMatcher could be not very cheap for some implementations ofFilter.ReadableOffsetgetBaseReadableOffset()Returns the same offset ("this") or a readable "view" of this offset, which always returns the same value fromReadableOffset.getOffset(), as this offset.intgetOffset()voidincrement()voidinspectRuntimeShape(RuntimeShapeInspector inspector)Implementations of this method should callinspector.visit()with all fields of this class, which meet two conditions: 1.voidreset()Resets the Offset to the position it was created or cloned with.booleanwithinBounds()
-
-
-
Method Detail
-
withinBounds
public boolean withinBounds()
- Specified by:
withinBoundsin classOffset
-
reset
public void reset()
Description copied from class:OffsetResets the Offset to the position it was created or cloned with.
-
getBaseReadableOffset
public ReadableOffset getBaseReadableOffset()
Description copied from class:OffsetReturns 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.- Specified by:
getBaseReadableOffsetin classOffset
-
clone
public Offset clone()
clone() is not supported by FilteredOffset because it's not possible to clonefilterMatcher, and while re-creating filterMatcher could be not very cheap for some implementations ofFilter. Although this approach could be investigated. If clone is made possible for FilteredOffset, some improvements could become possible inPooledTopNAlgorithm.computeSpecializedScanAndAggregateImplementations(). See also https://github.com/apache/druid/issues/5132.
-
getOffset
public int getOffset()
-
inspectRuntimeShape
public void inspectRuntimeShape(RuntimeShapeInspector inspector)
Description copied from interface:HotLoopCalleeImplementations of this method should callinspector.visit()with all fields of this class, which meet two conditions: 1. They are used in methods of this class, annotated withCalledFromHotLoop2. They are either: a. Nullable objects b. Instances of HotLoopCallee c. Objects, which don't always have a specific class in runtime. For example, a field of typeSetcould beHashSetorTreeSetin runtime, depending on how this instance (the instance on which inspectRuntimeShape() is called) is configured. d. ByteBuffer or similar objects, where byte order matters e. boolean flags, affecting branch taking f. Arrays of objects, meeting any of conditions a-e.
-
-