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[]regionsFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields 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 intfindRegionIndex(long elementIndex)REGION_TYPEgetRegion(int regionIndex)Map from a region index to its corresponding region.intgetRegionCount()Get the number of regions.longlength()REGION_TYPElookupRegion(long elementIndex)Perform region lookup for an element index.longmask()This mask is applied toOrderedKeyswhich 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, waitMethods 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, getChunkMethods 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:RegionedPageStorePerform region lookup for an element index.- Specified by:
lookupRegionin 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: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>- Specified by:
maskin 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:RegionedPageStoreGet the number of regions.- Specified by:
getRegionCountin 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:RegionedPageStoreMap from a region index to its corresponding region.- Specified by:
getRegionin 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)
-