Class SingleRangeOrderedKeys
java.lang.Object
com.illumon.iris.db.v2.utils.OrderedKeysAsChunkImpl
com.illumon.iris.db.v2.utils.singlerange.SingleRangeOrderedKeys
- All Implemented Interfaces:
LongSizedDataStructure,OrderedKeys,SingleRangeMixin,SafeCloseable,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.utils.OrderedKeys
OrderedKeys.Iterator -
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.utils.OrderedKeys
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionasIndex()Get anIndexrepresentation of thisOrderedKeys.copy()voidfillKeyIndicesChunk(WritableLongChunk<? extends Attributes.KeyIndices> chunkToFill) Fill the suppliedWritableLongChunkwith individual keys from thisOrderedKeys.voidfillKeyRangesChunk(WritableLongChunk<Attributes.OrderedKeyRanges> chunkToFill) Fill the suppliedWritableLongChunkwith key ranges from thisOrderedKeys.longfirstKey()Get the first key in thisOrderedKeys.booleanisEmpty()True if the size of thisOrderedkeysis zero.longlastKey()Get the last key in thisOrderedKeys.longrangeEnd()longlongprotected voidreset(long rangeStart, long rangeEnd) longsize()Get the number of keys in thisOrderedKeys.Methods inherited from class com.illumon.iris.db.v2.utils.OrderedKeysAsChunkImpl
asKeyIndicesChunk, asKeyRangesChunk, close, closeOrderedKeysAsChunkImpl, invalidateOrderedKeysAsChunkImpl, runsUpperBoundMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSizeMethods inherited from interface com.illumon.iris.db.v2.utils.OrderedKeys
asKeyIndicesChunk, asKeyRangesChunk, close, forAllLongRanges, forAllLongsMethods inherited from interface com.illumon.iris.db.v2.utils.singlerange.SingleRangeMixin
forEachLong, forEachLongRange, getAverageRunLengthEstimate, getOrderedKeysByKeyRange, getOrderedKeysByPosition, getOrderedKeysIterator, isContiguous
-
Method Details
-
rangeStart
public long rangeStart()- Specified by:
rangeStartin interfaceSingleRangeMixin
-
rangeEnd
public long rangeEnd()- Specified by:
rangeEndin interfaceSingleRangeMixin
-
reset
protected void reset(long rangeStart, long rangeEnd) -
copy
-
isEmpty
public boolean isEmpty()Description copied from interface:OrderedKeysTrue if the size of thisOrderedkeysis zero.- Specified by:
isEmptyin interfaceOrderedKeys- Returns:
- True if there are no elements in this
OrderedKeys.
-
lastKey
public long lastKey()Description copied from interface:OrderedKeysGet the last key in thisOrderedKeys.- Specified by:
lastKeyin interfaceOrderedKeys- Specified by:
lastKeyin classOrderedKeysAsChunkImpl- Returns:
- The last key, or
ReadOnlyIndex.NULL_KEYif there is none.
-
firstKey
public long firstKey()Description copied from interface:OrderedKeysGet the first key in thisOrderedKeys.- Specified by:
firstKeyin interfaceOrderedKeys- Returns:
- The first key, or
ReadOnlyIndex.NULL_KEYif there is none.
-
size
public long size()Description copied from interface:OrderedKeysGet the number of keys in thisOrderedKeys.- Specified by:
sizein interfaceLongSizedDataStructure- Specified by:
sizein interfaceOrderedKeys- Specified by:
sizein interfaceSingleRangeMixin- Returns:
- The size, in [0,
Long.MAX_VALUE]
-
rangesCountUpperBound
public long rangesCountUpperBound()- Specified by:
rangesCountUpperBoundin interfaceSingleRangeMixin- Specified by:
rangesCountUpperBoundin classOrderedKeysAsChunkImpl
-
asIndex
Description copied from interface:OrderedKeysGet anIndexrepresentation of thisOrderedKeys.- Specified by:
asIndexin interfaceOrderedKeys- Returns:
- An
Indexrepresentation for the same keys in the same order
-
fillKeyIndicesChunk
Description copied from interface:OrderedKeysFill the supplied
WritableLongChunkwith individual keys from thisOrderedKeys.The chunk's capacity is assumed to be big enough.
- Specified by:
fillKeyIndicesChunkin interfaceOrderedKeys- Parameters:
chunkToFill- A chunk to fill with individual keys
-
fillKeyRangesChunk
Description copied from interface:OrderedKeysFill the supplied
WritableLongChunkwith key ranges from thisOrderedKeys.The chunk's capacity is assumed to be big enough.
- Specified by:
fillKeyRangesChunkin interfaceOrderedKeys- Parameters:
chunkToFill- A chunk to fill with key ranges
-