Class SortedRangesLong
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<long[]>
com.illumon.iris.db.v2.utils.sortedranges.SortedRangesLong
- All Implemented Interfaces:
TreeIndexImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRanges
SortedRanges.RangeIterator
Nested 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.SortedRangesTyped
data
Fields 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_ARRAY
Fields inherited from interface com.illumon.iris.db.v2.utils.TreeIndexImpl
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionSortedRangesLong
(int initialCapacity) SortedRangesLong
(long[] data) SortedRangesLong
(long[] data, int count, long cardinality) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
absUnpackedGet
(int i) addInternal
(long v, boolean writeCheck) addRangeInternal
(long start, long end, boolean writeCheck) final SortedRanges
appendInternal
(long v, boolean writeCheck) final SortedRanges
appendRangeInternal
(long start, long end, boolean writeCheck) applyShift
(long shiftOffset) applyShiftOnNew
(long shiftOffset) int
int
protected int
capacityForLastIndex
(int lastIndex, boolean isDense) protected int
deepCopy()
Get a deep copy of the current object, not shared with anybody.boolean
fits
(long v) boolean
fits
(long start, long end) boolean
fitsForAppend
(long end) protected void
freeArray
(long[] arr) protected SortedRangesLong
growOnNew
(int capacity) boolean
isDense()
protected long[]
makeArray
(int capacity) protected SortedRangesLong
makeMyTypeAndOffset
(int initialCapacity) static SortedRangesLong
makeSingleRange
(long start, long end) protected long
pack
(long value) protected long
packedGet
(int i) protected void
packedSet
(int i, long value) protected int
removeInternal
(long v) removeRangeInternal
(long start, long end) tryMakePackedType
(int maxPos, long first, boolean isDense) protected SortedRanges
tryPack()
tryPackFor
(long first, long last, int newLastPos, boolean isDense) protected long
unpack
(long rawValue) protected long
unpackedGet
(int i) protected void
unpackedSet
(int i, long value) Methods inherited from class com.illumon.iris.db.v2.utils.sortedranges.SortedRangesTyped
checkSizeAndMoveData, copyData, copyData, copyData, copyDataForMoveToNew, copyTo, ensureCanAppend, moveData, tryCompactUnsafe
Methods 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, mergeAppend, offsetToDebugString, 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, validate
Methods inherited from class com.illumon.iris.db.v2.utils.RefCountedCow
acquire, canWrite, cowRef, getWriteRef, notifyAfterRelease, notifyBeforeAcquire, refCount, release
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.utils.TreeIndexImpl
ixInsert, ixRemove, ixValidate
-
Constructor Details
-
SortedRangesLong
public SortedRangesLong() -
SortedRangesLong
public SortedRangesLong(int initialCapacity) -
SortedRangesLong
public SortedRangesLong(long[] data) -
SortedRangesLong
public SortedRangesLong(long[] data, int count, long cardinality)
-
-
Method Details
-
fits
public boolean fits(long v) - Specified by:
fits
in classSortedRanges
-
fits
public boolean fits(long start, long end) - Specified by:
fits
in classSortedRanges
-
fitsForAppend
public boolean fitsForAppend(long end) - Specified by:
fitsForAppend
in classSortedRanges
-
deepCopy
Description copied from class:RefCountedCow
Get a deep copy of the current object, not shared with anybody. Note this is not thread safe.- Specified by:
deepCopy
in classSortedRanges
- Returns:
- A full, deep copy of this object with a reference count of 1 (not shared).
-
packedValuesPerCacheLine
protected int packedValuesPerCacheLine()- Specified by:
packedValuesPerCacheLine
in classSortedRanges
-
capacityForLastIndex
protected int capacityForLastIndex(int lastIndex, boolean isDense) - Specified by:
capacityForLastIndex
in classSortedRangesTyped<long[]>
-
makeArray
protected long[] makeArray(int capacity) - Specified by:
makeArray
in classSortedRangesTyped<long[]>
-
freeArray
protected void freeArray(long[] arr) - Specified by:
freeArray
in classSortedRangesTyped<long[]>
-
makeMyTypeAndOffset
- Specified by:
makeMyTypeAndOffset
in classSortedRangesTyped<long[]>
-
dataLength
protected int dataLength()- Specified by:
dataLength
in classSortedRanges
-
packedGet
protected long packedGet(int i) - Specified by:
packedGet
in classSortedRanges
-
packedSet
protected void packedSet(int i, long value) - Specified by:
packedSet
in classSortedRanges
-
pack
protected long pack(long value) - Specified by:
pack
in classSortedRanges
-
unpackedGet
protected long unpackedGet(int i) - Specified by:
unpackedGet
in classSortedRanges
-
absUnpackedGet
protected long absUnpackedGet(int i) - Specified by:
absUnpackedGet
in classSortedRanges
-
unpackedSet
protected void unpackedSet(int i, long value) - Specified by:
unpackedSet
in classSortedRanges
-
unpack
protected long unpack(long rawValue) - Specified by:
unpack
in classSortedRanges
-
makeSingleRange
-
addInternal
- Specified by:
addInternal
in classSortedRanges
-
addRangeInternal
- Specified by:
addRangeInternal
in classSortedRanges
-
appendInternal
- Specified by:
appendInternal
in classSortedRanges
-
appendRangeInternal
- Specified by:
appendRangeInternal
in classSortedRanges
-
removeInternal
- Specified by:
removeInternal
in classSortedRanges
-
removeRangeInternal
- Specified by:
removeRangeInternal
in classSortedRanges
-
applyShift
- Specified by:
applyShift
in classSortedRanges
-
applyShiftOnNew
- Specified by:
applyShiftOnNew
in classSortedRanges
-
tryPackFor
- Specified by:
tryPackFor
in classSortedRanges
-
tryMakePackedType
- Specified by:
tryMakePackedType
in classSortedRangesTyped<long[]>
-
growOnNew
- Specified by:
growOnNew
in classSortedRanges
-
bytesAllocated
public int bytesAllocated()- Specified by:
bytesAllocated
in classSortedRanges
-
bytesUsed
public int bytesUsed()- Specified by:
bytesUsed
in classSortedRanges
-
tryPack
- Specified by:
tryPack
in classSortedRanges
-
isDense
public boolean isDense()- Specified by:
isDense
in classSortedRanges
-