Class SortedRangesInt
java.lang.Object
com.illumon.iris.db.v2.utils.RefCountedCow<SortedRanges>
com.illumon.iris.db.v2.utils.sortedranges.SortedRanges
com.illumon.iris.db.v2.utils.sortedranges.SortedRangesTyped<ArrayType>
com.illumon.iris.db.v2.utils.sortedranges.SortedRangesPacked<int[]>
com.illumon.iris.db.v2.utils.sortedranges.SortedRangesInt
- All Implemented Interfaces:
TreeIndexImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRanges
SortedRanges.RangeIteratorNested classes/interfaces inherited from interface com.illumon.iris.db.v2.utils.TreeIndexImpl
TreeIndexImpl.RandomBuilder, TreeIndexImpl.SequentialBuilder -
Field Summary
Fields inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRangesPacked
offsetFields inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRangesTyped
dataFields inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRanges
cardinality, count, DEBUG, ELEMENTS_PER_BLOCK_DENSE_THRESHOLD, INITIAL_SIZE, INT_DENSE_MAX_CAPACITY, INT_EXTENT, INT_SPARSE_MAX_CAPACITY, LONG_DENSE_MAX_CAPACITY, LONG_EXTENT, LONG_SPARSE_MAX_CAPACITY, MAX_CAPACITY, POOL_ARRAYS, SHORT_EXTENT, SHORT_MAX_CAPACITY, USE_RANGES_ARRAYFields inherited from interface com.illumon.iris.db.v2.utils.TreeIndexImpl
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionSortedRangesInt(int[] data, long offset, int count, long cardinality) SortedRangesInt(int initialCapacity, long offset) SortedRangesInt(long offset, SortedRangesLong sa, int initialCapacity) -
Method Summary
Modifier and TypeMethodDescriptionprotected longabsUnpackedGet(int i) intintprotected intcapacityForLastIndex(int lastIndex, boolean isDense) protected intdeepCopy()Get a deep copy of the current object, not shared with anybody.voidfreeArray(int[] arr) protected SortedRangesIntgrowOnNew(int capacity) booleanisDense()protected int[]makeArray(int capacity) protected SortedRangesIntmakeMyType(int[] data, long offset, int count, long cardinality) protected SortedRangesIntmakeMyTypeAndOffset(int initialCapacity) protected longprotected longpackedGet(int i) protected voidpackedSet(int i, long v) protected intprotected voidrebaseAndShift(int[] dataOut, long newOffset, long shiftOffset, SortedRangesTyped<int[]> sar, long first) tryMakePackedType(int maxPos, long first, boolean isDense) protected SortedRangesShorttryPack()protected SortedRangestryPackFor(long first, long last, int maxPos, boolean isDense) protected longunpackedGet(int i) protected voidunpackedSet(int i, long v) Methods inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRangesPacked
addInternal, addRangeInternal, appendInternal, appendRangeInternal, applyShift, applyShiftOnNew, fits, fits, fitsForAppend, offset, offsetToDebugString, pack, removeInternal, removeRangeInternal, unpackMethods inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRangesTyped
checkSizeAndMoveData, copyData, copyData, copyData, copyDataForMoveToNew, copyTo, ensureCanAppend, moveData, tryCompactUnsafeMethods inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRanges
absPackedGet, add, addPacked, addPackedWithStart, addRange, addRangePacked, addRangePackedWithStart, addRangeUnsafe, addUnsafe, append, appendPacked, appendRange, appendRangePacked, appendRangeUnpacked, appendRangeUnsafe, appendUnsafe, arraySizeRoundingInt, arraySizeRoundingShort, clear, close, close2, contains, containsRange, count, dataToDebugString, find, first, forEachLong, forEachLongRange, get, getAverageRunLengthEstimate, getCardinality, getIterator, getKeysForPositions, getOrderedKeysByKeyRange, getOrderedKeysByPosition, getOrderedKeysByPositionWithStart, getOrderedKeysIterator, getRangeIterator, getReverseIterator, getSearchIterator, hasMoreThanOneRange, insertImpl, insertImpl, intArrayCapacityForLastIndex, intersectOnNew, intersectOnNewImpl, invertOnNew, invertRangeOnNew, isDenseInt, isDenseLong, isDenseLongSample, isDenseShort, isEmpty, isIntAllocationSize, isLongAllocationSize, isShortAllocationSize, isSparse, ixAppendRange, ixCardinality, ixCompact, ixContainsRange, ixCowRef, ixFind, ixFirstKey, ixForEachLong, ixForEachLongRange, ixGet, ixGetAverageRunLengthEstimate, ixGetKeysForPositions, ixGetOrderedKeysByKeyRange, ixGetOrderedKeysByPosition, ixGetOrderedKeysIterator, ixInsert, ixInsert, ixInsertRange, ixInsertSecondHalf, ixInsertWithShift, ixIntersectOnNew, ixInvertOnNew, ixIsEmpty, ixIterator, ixLastKey, ixMinusOnNew, ixOverlaps, ixOverlapsRange, ixRangeIterator, ixRangesCountUpperBound, ixRefCount, ixRelease, ixRemove, ixRemove, ixRemoveRange, ixRemoveSecondHalf, ixRetain, ixRetainRange, ixReverseIterator, ixSearchIterator, ixShiftInPlace, ixShiftOnNew, ixSubindexByKeyOnNew, ixSubindexByPosOnNew, ixSubsetOf, ixToRspOnNew, ixUnionOnNew, ixUpdate, ixValidate, last, longArrayCapacityForLastIndex, makeEmpty, makeForKnownRange, makeSingleElement, makeSingleRange, mergeAppend, overlaps, overlapsRange, remove, remove, removePacked, removeRange, removeRangePacked, removeRangePackedWithStart, retainRange, self, shortArrayCapacityForLastIndex, subRangesByKey, subRangesByPos, subsetOf, toDebugString, toRsp, toString, tryCompact, tryMakeForKnownRangeFinalCapacityLowerBound, tryMakeForKnownRangeKnownCount, tryMakeForKnownRangeUnknownMaxCapacity, tryPackWithNewLast, unionOnNew, unionOnNewLegacy, validate, validate, validateMethods inherited from class com.illumon.iris.db.v2.utils.RefCountedCow
acquire, canWrite, cowRef, getWriteRef, notifyAfterRelease, notifyBeforeAcquire, refCount, releaseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.utils.TreeIndexImpl
ixInsert, ixRemove, ixValidate
-
Constructor Details
-
SortedRangesInt
public SortedRangesInt(int initialCapacity, long offset) -
SortedRangesInt
public SortedRangesInt(int[] data, long offset, int count, long cardinality) -
SortedRangesInt
-
-
Method Details
-
deepCopy
Description copied from class:RefCountedCowGet a deep copy of the current object, not shared with anybody. Note this is not thread safe.- Specified by:
deepCopyin classSortedRanges- Returns:
- A full, deep copy of this object with a reference count of 1 (not shared).
-
packedValuesPerCacheLine
protected int packedValuesPerCacheLine()- Specified by:
packedValuesPerCacheLinein classSortedRanges
-
makeMyTypeAndOffset
- Specified by:
makeMyTypeAndOffsetin classSortedRangesTyped<int[]>
-
makeArray
protected int[] makeArray(int capacity) - Specified by:
makeArrayin classSortedRangesTyped<int[]>
-
freeArray
public void freeArray(int[] arr) - Specified by:
freeArrayin classSortedRangesTyped<int[]>
-
dataLength
protected int dataLength()- Specified by:
dataLengthin classSortedRanges
-
maxValueForType
protected long maxValueForType()- Specified by:
maxValueForTypein classSortedRangesPacked<int[]>
-
capacityForLastIndex
protected int capacityForLastIndex(int lastIndex, boolean isDense) - Specified by:
capacityForLastIndexin classSortedRangesTyped<int[]>
-
unpackedGet
protected long unpackedGet(int i) - Specified by:
unpackedGetin classSortedRanges
-
absUnpackedGet
protected long absUnpackedGet(int i) - Specified by:
absUnpackedGetin classSortedRanges
-
unpackedSet
protected void unpackedSet(int i, long v) - Specified by:
unpackedSetin classSortedRanges
-
packedGet
protected long packedGet(int i) - Specified by:
packedGetin classSortedRanges
-
packedSet
protected void packedSet(int i, long v) - Specified by:
packedSetin classSortedRanges
-
tryPackFor
- Specified by:
tryPackForin classSortedRanges
-
tryMakePackedType
- Specified by:
tryMakePackedTypein classSortedRangesTyped<int[]>
-
growOnNew
- Specified by:
growOnNewin classSortedRanges
-
makeMyType
- Specified by:
makeMyTypein classSortedRangesPacked<int[]>
-
rebaseAndShift
protected void rebaseAndShift(int[] dataOut, long newOffset, long shiftOffset, SortedRangesTyped<int[]> sar, long first) - Specified by:
rebaseAndShiftin classSortedRangesPacked<int[]>
-
bytesAllocated
public int bytesAllocated()- Specified by:
bytesAllocatedin classSortedRanges
-
bytesUsed
public int bytesUsed()- Specified by:
bytesUsedin classSortedRanges
-
tryPack
- Specified by:
tryPackin classSortedRanges
-
isDense
public boolean isDense()- Specified by:
isDensein classSortedRanges
-