Class RegionedPageStore.Static<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
java.lang.Object
com.illumon.iris.db.v2.sources.regioned.RegionedPageStore.Static<ATTR,INNER_ATTR,REGION_TYPE>
- All Implemented Interfaces:
LongSizedDataStructure
,ChunkSource<ATTR>
,DefaultChunkSource<ATTR>
,DefaultChunkSource.SupportsContiguousGet<ATTR>
,FillContextMaker
,GetContextMaker
,PageStore<ATTR,INNER_ATTR,REGION_TYPE>
,PagingChunkSource<ATTR>
,RegionedPageStore<ATTR,INNER_ATTR,REGION_TYPE>
- Direct Known Subclasses:
ColumnRegionByte.StaticPageStore
,ColumnRegionChar.StaticPageStore
,ColumnRegionDouble.StaticPageStore
,ColumnRegionFloat.StaticPageStore
,ColumnRegionInt.StaticPageStore
,ColumnRegionLong.StaticPageStore
,ColumnRegionObject.StaticPageStore
,ColumnRegionShort.StaticPageStore
- Enclosing interface:
- RegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
public abstract static class RegionedPageStore.Static<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>> extends Object implements RegionedPageStore<ATTR,INNER_ATTR,REGION_TYPE>
A regioned page store for use when the full set of regions and their sizes are known.
-
Nested Class Summary
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>
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.regioned.RegionedPageStore
RegionedPageStore.Helper, RegionedPageStore.Static<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
-
Field Summary
Fields Modifier and Type Field Description protected REGION_TYPE[]
regions
Fields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
Fields inherited from interface com.illumon.iris.db.v2.sources.regioned.RegionedPageStore
REGION_MASK, REGION_MASK_NUM_BITS
-
Constructor Summary
Constructors Constructor Description Static(REGION_TYPE[] regions)
-
Method Summary
Modifier and Type Method Description protected int
findRegionIndex(long elementIndex)
REGION_TYPE
getRegion(int regionIndex)
Map from a region index to its corresponding region.int
getRegionCount()
Get the number of regions.long
length()
REGION_TYPE
lookupRegion(long elementIndex)
Perform region lookup for an element index.long
mask()
This mask is applied toOrderedKeys
which are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)
andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys)
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
getChunkType, getNativeType
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeGetContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PageStore
doFillChunkAppend, fillChunk, fillChunkAppend, getChunk, getChunk
Methods inherited from interface com.illumon.iris.db.v2.sources.regioned.RegionedPageStore
getPageContaining, makeFillContext, size
-
Field Details
-
Constructor Details
-
Static
- Parameters:
regions
- Array of all regions in this page store. Array becomes property of the page store.
-
-
Method Details
-
length
public long length() -
lookupRegion
Description copied from interface:RegionedPageStore
Perform region lookup for an element index.- Specified by:
lookupRegion
in interfaceRegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
- Parameters:
elementIndex
- The element index to get the region for- Returns:
- The appropriate region
-
mask
public long mask()Description copied from interface:PagingChunkSource
This mask is applied toOrderedKeys
which are passed intoChunkSource.getChunk(ChunkSource.GetContext, OrderedKeys)
andChunkSource.fillChunk(ChunkSource.FillContext, WritableChunk, OrderedKeys)
. This allows thePagingChunkSource
s to be cached, and reused even if they are properly relocated in key space.- Specified by:
mask
in interfacePagingChunkSource<ATTR extends Attributes.Any>
- Specified by:
mask
in interfaceRegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
- Returns:
- the mask for this page, which must be a bitmask representing the some number of lower order bits of a long.
-
getRegionCount
public final int getRegionCount()Description copied from interface:RegionedPageStore
Get the number of regions.- Specified by:
getRegionCount
in interfaceRegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
- Returns:
- The number of regions that have been added
-
getRegion
Description copied from interface:RegionedPageStore
Map from a region index to its corresponding region.- Specified by:
getRegion
in interfaceRegionedPageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,REGION_TYPE extends Page<INNER_ATTR>>
- Parameters:
regionIndex
- The region index- Returns:
- The region for the supplied region index
-
findRegionIndex
protected int findRegionIndex(long elementIndex)
-