Package com.illumon.iris.db.v2.utils
Class IndexUtilities
java.lang.Object
com.illumon.iris.db.v2.utils.IndexUtilities
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fishlib.base.log.LogOutputappend(com.fishlib.base.log.LogOutput logOutput, ReadOnlyIndex.RangeIterator it) static voidfillKeyIndicesChunk(ReadOnlyIndex index, WritableLongChunk<? extends Attributes.KeyIndices> chunkToFill) static voidfillKeyRangesChunk(ReadOnlyIndex index, WritableLongChunk<Attributes.OrderedKeyRanges> chunkToFill) static voidforAllInvertedLongRanges(Index sourceIndex, Index destIndex, LongRangeConsumer lrc) This is equivalent to `sourceIndex.invert(destIndex).forAllLongRanges(lrc)`, but requires O(1) space.static longrangeSearch(long begin, long end, IndexUtilities.Comparator comp) Look for the biggest value of i that satisfies begin <= i <= end and comp.directionToTargetFrom(i) > 0, or some value that satisfies comp.directionToTargetFrom(i) == 0.
-
Constructor Details
-
IndexUtilities
public IndexUtilities()
-
-
Method Details
-
fillKeyIndicesChunk
public static void fillKeyIndicesChunk(ReadOnlyIndex index, WritableLongChunk<? extends Attributes.KeyIndices> chunkToFill) -
fillKeyRangesChunk
public static void fillKeyRangesChunk(ReadOnlyIndex index, WritableLongChunk<Attributes.OrderedKeyRanges> chunkToFill) -
append
public static com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput, ReadOnlyIndex.RangeIterator it) -
rangeSearch
Look for the biggest value of i that satisfies begin <= i <= end and comp.directionToTargetFrom(i) > 0, or some value that satisfies comp.directionToTargetFrom(i) == 0.- Parameters:
begin- The beginning of the range (inclusive)end- The end of the range (inclusive)comp- a Comparator.- Returns:
- the last position i inside the provided range that satisfies comp.directionToTargetFrom(i) > 0, or some position that satisfies comp.directionToTargetFrom(i) == 0.
-
forAllInvertedLongRanges
public static void forAllInvertedLongRanges(Index sourceIndex, Index destIndex, LongRangeConsumer lrc) This is equivalent to `sourceIndex.invert(destIndex).forAllLongRanges(lrc)`, but requires O(1) space. Note that coalescing adjacent position-space runs enablesPreemptiveUpdatesTable.copyPartialColumns(com.illumon.iris.db.v2.utils.Index, com.illumon.iris.db.v2.utils.Index, java.lang.Object[], java.lang.Object[])to make minimal System.arraycopy calls.- Parameters:
sourceIndex- index to find the destIndex keys in - ranges in the callback will be on this indexdestIndex- index values to look for within sourceIndexlrc- consumer to handle each inverted range that is encountered
-