Interface RegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
- All Superinterfaces:
ChunkSource<ATTR>,DefaultChunkSource<ATTR>,DefaultChunkSource.SupportsContiguousGet<ATTR>,FillContextMaker,GetContextMaker,LongSizedDataStructure,PageStore<ATTR,INNER_ATTR,REGION_TYPE>,PagingChunkSource<ATTR>
- All Known Implementing Classes:
ColumnRegionByte.StaticPageStore,ColumnRegionChar.StaticPageStore,ColumnRegionDouble.StaticPageStore,ColumnRegionFloat.StaticPageStore,ColumnRegionInt.StaticPageStore,ColumnRegionLong.StaticPageStore,ColumnRegionObject.StaticPageStore,ColumnRegionShort.StaticPageStore,RegionedColumnSourceObject,RegionedColumnSourceObject.AsValues,RegionedColumnSourceObjectWithDictionary,RegionedPageStore.Static
public interface RegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>> extends PageStore<ATTR,INNER_ATTR,REGION_TYPE>, LongSizedDataStructure
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRegionedPageStore.Helperstatic classRegionedPageStore.Static<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>A regioned page store for use when the full set of regions and their sizes are known.Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any> -
Field Summary
Fields Modifier and Type Field Description static longREGION_MASKstatic longREGION_MASK_NUM_BITSFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY -
Method Summary
Modifier and Type Method Description static longgetElementIndex(int regionIndex, long regionOffset)Get the element index.static longgetFirstElementIndex(int regionIndex)Get the first element index.static longgetLastElementIndex(int regionIndex)Get the last element index.default REGION_TYPEgetPageContaining(ChunkSource.FillContext fillContext, long row)REGION_TYPEgetRegion(int regionIndex)Map from a region index to its corresponding region.intgetRegionCount()Get the number of regions.static intgetRegionIndex(long elementIndex)Get the region index.default REGION_TYPElookupRegion(long elementIndex)Perform region lookup for an element index.default ChunkSource.FillContextmakeFillContext(int chunkCapacity, SharedContext sharedContext)Allocate a newChunkSource.FillContextfor filling chunks from thisFillContextMaker, typically aChunkSource.default longmask()This mask is applied toOrderedKeyswhich are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys).default longsize()The size of this data structure.Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
getChunkType, getNativeTypeMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PageStore
doFillChunkAppend, fillChunk, fillChunkAppend, getChunk, getChunk
-
Field Details
-
REGION_MASK
static final long REGION_MASK- See Also:
- Constant Field Values
-
REGION_MASK_NUM_BITS
static final long REGION_MASK_NUM_BITS
-
-
Method Details
-
size
default long size()Description copied from interface:LongSizedDataStructureThe size of this data structure.- Specified by:
sizein interfaceLongSizedDataStructure- Returns:
- The total number of rows across all regions.
- ImplNote:
- We intentionally do not derive from Page and implement Page.length() because our index is not contiguous.
-
getRegionIndex
static int getRegionIndex(long elementIndex)Get the region index.- Returns:
- The region index for an element index.
-
getFirstElementIndex
static long getFirstElementIndex(int regionIndex)Get the first element index.- Returns:
- the first element index for a region index.
-
getLastElementIndex
static long getLastElementIndex(int regionIndex)Get the last element index.- Returns:
- the last element index for a region index.
-
getElementIndex
static long getElementIndex(int regionIndex, long regionOffset)Get the element index.- Returns:
- the element index for a particular region offset of a region index.
-
getRegionCount
int getRegionCount()Get the number of regions.- Returns:
- The number of regions that have been added
-
getRegion
Map from a region index to its corresponding region.- Parameters:
regionIndex- The region index- Returns:
- The region for the supplied region index
-
lookupRegion
Perform region lookup for an element index.- Parameters:
elementIndex- The element index to get the region for- Returns:
- The appropriate region
-
getPageContaining
@NotNull @FinalDefault default REGION_TYPE getPageContaining(ChunkSource.FillContext fillContext, long row)- Specified by:
getPageContainingin interfacePageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>- Returns:
- The page containing row, after applying
PagingChunkSource.mask().
-
mask
Description copied from interface:PagingChunkSourceThis mask is applied toOrderedKeyswhich are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys). This allows thePagingChunkSources to be cached, and reused even if they are properly relocated in key space.- Specified by:
maskin interfacePagingChunkSource<ATTR extends Attributes.Any>- Returns:
- the mask for this page, which must be a bitmask representing the some number of lower order bits of a long.
-
makeFillContext
Description copied from interface:FillContextMakerAllocate a newChunkSource.FillContextfor filling chunks from thisFillContextMaker, typically aChunkSource.- Specified by:
makeFillContextin interfaceDefaultChunkSource<ATTR extends Attributes.Any>- Specified by:
makeFillContextin interfaceFillContextMaker- Parameters:
chunkCapacity- The maximum size of anyWritableChunkthat will be filled with this contextsharedContext- Shared store of intermediate results.- Returns:
- A context for use with fill operations
-