Package com.illumon.iris.db.v2.utils
Interface IndexBuilder
- All Known Subinterfaces:
Index.RandomBuilder
- All Known Implementing Classes:
Index.AbstractRandomBuilder
,Index.AdaptiveIndexBuilder
public interface IndexBuilder
A builder that constructs an
Index
from a set of keys.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IndexBuilder.Helper
-
Method Summary
Modifier and Type Method Description default void
addIndex(ReadOnlyIndex idx)
Add the entireReadOnlyIndex
to this buildervoid
addKey(long key)
Add the specified key to the builder.default void
addKeyIndicesChunk(IntChunk<Attributes.KeyIndices> chunk)
Add all of the keys from the specifiedAttributes.KeyIndices
.default void
addKeyIndicesChunk(LongChunk<Attributes.KeyIndices> chunk)
Add all of the keys from the specifiedAttributes.KeyIndices
.default void
addKeys(PrimitiveIterator.OfLong it)
Add a set of keys from the provided long iterator.default void
addOrderedKeyIndicesChunk(LongChunk<Attributes.OrderedKeyIndices> chunk)
Add all of the keys from the specifiedAttributes.OrderedKeyIndices
.void
addRange(long firstKey, long lastKey)
Append the specified range of keys to the builder.default void
addRanges(LongRangeIterator it)
Add all of the ranges from the specifiedLongRangeIterator
.Index
getIndex()
Get the index constructed from all of the keys added so far.
-
Method Details
-
getIndex
Index getIndex()Get the index constructed from all of the keys added so far.- Returns:
- an Index
-
addKey
void addKey(long key)Add the specified key to the builder.- Parameters:
key
- the key
-
addRange
void addRange(long firstKey, long lastKey)Append the specified range of keys to the builder.- Parameters:
firstKey
- the first key in the range (inclusive)firstKey
- the last key in the range (inclusive)
-
addKeys
Add a set of keys from the provided long iterator.- Parameters:
it
- the iterator
-
addRanges
Add all of the ranges from the specifiedLongRangeIterator
.- Parameters:
it
- the long range iterator
-
addKeyIndicesChunk
Add all of the keys from the specifiedAttributes.KeyIndices
.- Parameters:
chunk
- the chunk of ordered indices
-
addKeyIndicesChunk
Add all of the keys from the specifiedAttributes.KeyIndices
.- Parameters:
chunk
- the chunk of ordered indices
-
addOrderedKeyIndicesChunk
Add all of the keys from the specifiedAttributes.OrderedKeyIndices
.- Parameters:
chunk
- the chunk of ordered indices
-
addIndex
Add the entireReadOnlyIndex
to this builder- Parameters:
idx
- the index
-