Package com.illumon.iris.db.v2.ssa
Interface SegmentedSortedArray
- All Superinterfaces:
LongSizedDataStructure
- All Known Implementing Classes:
ByteReverseSegmentedSortedArray
,ByteSegmentedSortedArray
,CharReverseSegmentedSortedArray
,CharSegmentedSortedArray
,DoubleReverseSegmentedSortedArray
,DoubleSegmentedSortedArray
,FloatReverseSegmentedSortedArray
,FloatSegmentedSortedArray
,IntReverseSegmentedSortedArray
,IntSegmentedSortedArray
,LongReverseSegmentedSortedArray
,LongSegmentedSortedArray
,NullAwareCharReverseSegmentedSortedArray
,NullAwareCharSegmentedSortedArray
,ObjectReverseSegmentedSortedArray
,ObjectSegmentedSortedArray
,ShortReverseSegmentedSortedArray
,ShortSegmentedSortedArray
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyShift
(Chunk<? extends Attributes.Any> stampChunk, LongChunk<? extends Attributes.KeyIndices> keyChunk, long shiftDelta) void
applyShiftReverse
(Chunk<? extends Attributes.Any> stampChunk, LongChunk<? extends Attributes.KeyIndices> keyChunk, long shiftDelta) void
forAllKeys
(LongConsumer longConsumer) Call the longConsumer for each of the long index keys in this SegmentedSortedArray.long
getFirst()
long
getLast()
int
void
insert
(Chunk<? extends Attributes.Any> valuesToInsert, LongChunk<? extends Attributes.KeyIndices> indicesToInsert) Insert new valuesToInsert into this SSA.<T extends Attributes.Any>
intinsertAndGetNextValue
(Chunk<T> valuesToInsert, LongChunk<? extends Attributes.KeyIndices> indicesToInsert, WritableChunk<T> nextValue) boolean
static SegmentedSortedArray
static Supplier<SegmentedSortedArray>
makeFactory
(ChunkType chunkType, boolean reverse, int nodeSize) void
remove
(Chunk<? extends Attributes.Any> valuesToRemove, LongChunk<? extends Attributes.KeyIndices> indicesToRemove) Remove valuesToRemove from this SSA.void
removeAndGetPrior
(Chunk<? extends Attributes.Any> stampChunk, LongChunk<? extends Attributes.KeyIndices> indicesToRemove, WritableLongChunk<? extends Attributes.KeyIndices> priorRedirections) Remove the values and indices referenced in stampChunk and indicesToRemove.Methods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSize, size
-
Field Details
-
SEGMENTED_SORTED_ARRAY_VALIDATION
static final boolean SEGMENTED_SORTED_ARRAY_VALIDATION
-
-
Method Details
-
make
-
makeFactory
static Supplier<SegmentedSortedArray> makeFactory(ChunkType chunkType, boolean reverse, int nodeSize) -
insert
void insert(Chunk<? extends Attributes.Any> valuesToInsert, LongChunk<? extends Attributes.KeyIndices> indicesToInsert) Insert new valuesToInsert into this SSA. The valuesToInsert to insert must be sorted.- Parameters:
valuesToInsert
- the valuesToInsert to insertindicesToInsert
- the corresponding indicesToInsert
-
remove
void remove(Chunk<? extends Attributes.Any> valuesToRemove, LongChunk<? extends Attributes.KeyIndices> indicesToRemove) Remove valuesToRemove from this SSA. The valuesToRemove to remove must be sorted.- Parameters:
valuesToRemove
- the valuesToRemove to removeindicesToRemove
- the corresponding indices
-
removeAndGetPrior
void removeAndGetPrior(Chunk<? extends Attributes.Any> stampChunk, LongChunk<? extends Attributes.KeyIndices> indicesToRemove, WritableLongChunk<? extends Attributes.KeyIndices> priorRedirections) Remove the values and indices referenced in stampChunk and indicesToRemove. Fill priorRedirections with the redirection value immediately preceding the removed value.- Parameters:
stampChunk
- the values to removeindicesToRemove
- the indices (parallel to the values)priorRedirections
- the output prior redirections (parallel to valeus/indices)
-
insertAndGetNextValue
<T extends Attributes.Any> int insertAndGetNextValue(Chunk<T> valuesToInsert, LongChunk<? extends Attributes.KeyIndices> indicesToInsert, WritableChunk<T> nextValue) -
applyShift
void applyShift(Chunk<? extends Attributes.Any> stampChunk, LongChunk<? extends Attributes.KeyIndices> keyChunk, long shiftDelta) -
applyShiftReverse
void applyShiftReverse(Chunk<? extends Attributes.Any> stampChunk, LongChunk<? extends Attributes.KeyIndices> keyChunk, long shiftDelta) -
getNodeSize
int getNodeSize() -
forAllKeys
Call the longConsumer for each of the long index keys in this SegmentedSortedArray.- Parameters:
longConsumer
- the long consumer to call
-
makeChecker
SsaChecker makeChecker() -
isReversed
boolean isReversed() -
getFirst
long getFirst()- Returns:
- the first index in this SSA, Index.NULL_KEY when empty.
-
getLast
long getLast()- Returns:
- the last index in this SSA, Index.NULL_KEY when empty.
-