Interface PageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,PAGE extends Page<INNER_ATTR>>
- All Superinterfaces:
ChunkSource<ATTR>
,DefaultChunkSource<ATTR>
,DefaultChunkSource.SupportsContiguousGet<ATTR>
,FillContextMaker
,GetContextMaker
,PagingChunkSource<ATTR>
- All Known Subinterfaces:
BufferedColumnRegion<ATTR>
,RegionedPageStore<ATTR,INNER_ATTR,REGION_TYPE>
- All Known Implementing Classes:
BufferedColumnRegionBase
,BufferedColumnRegionByte
,BufferedColumnRegionChar
,BufferedColumnRegionDouble
,BufferedColumnRegionFloat
,BufferedColumnRegionInt
,BufferedColumnRegionLong
,BufferedColumnRegionShort
,ColumnChunkPageStore
,ColumnRegionByte.StaticPageStore
,ColumnRegionChar.StaticPageStore
,ColumnRegionDouble.StaticPageStore
,ColumnRegionFloat.StaticPageStore
,ColumnRegionInt.StaticPageStore
,ColumnRegionLong.StaticPageStore
,ColumnRegionObject.StaticPageStore
,ColumnRegionShort.StaticPageStore
,RegionedColumnSourceObject
,RegionedColumnSourceObject.AsValues
,RegionedColumnSourceObjectWithDictionary
,RegionedPageStore.Static
public interface PageStore<ATTR extends Attributes.Any,INNER_ATTR extends ATTR,PAGE extends Page<INNER_ATTR>> extends PagingChunkSource<ATTR>, DefaultChunkSource.SupportsContiguousGet<ATTR>
PageStores are a collection of non-overlapping pages, which provides a single
ChunkSource
interface across all the pages.-
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>
-
Field Summary
Fields 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 default void
doFillChunkAppend(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys orderedKeys, Page<INNER_ATTR> page)
This is a helper which is the same as a call tofillChunkAppend(com.illumon.iris.db.v2.sources.chunk.ChunkSource.FillContext, com.illumon.iris.db.v2.sources.chunk.WritableChunk<? super ATTR>, com.illumon.iris.db.v2.utils.OrderedKeys.Iterator)
, except that some of the initial work has already been done for the first call toPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, OrderedKeys.Iterator)
which we don't want to repeat.default void
fillChunk(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys orderedKeys)
Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys
.default void
fillChunkAppend(ChunkSource.FillContext context, WritableChunk<? super ATTR> destination, OrderedKeys.Iterator orderedKeysIterator)
Similar toChunkSource.fillChunk(FillContext, WritableChunk, OrderedKeys)
, except that the values from the ChunkSource are appended todestination
, rather than placed at the beginning.default Chunk<? extends ATTR>
getChunk(ChunkSource.GetContext context, long firstKey, long lastKey)
Same asChunkSource.getChunk(GetContext, OrderedKeys)
, except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anOrderedKeys
.default Chunk<? extends ATTR>
getChunk(ChunkSource.GetContext context, OrderedKeys orderedKeys)
Returns a chunk of data corresponding to the keys from the givenOrderedKeys
.PAGE
getPageContaining(ChunkSource.FillContext fillContext, long row)
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, makeFillContext, 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.PagingChunkSource
mask, maxRow
-
Method Details
-
getPageContaining
- Returns:
- The page containing row, after applying
PagingChunkSource.mask()
.
-
getChunk
default Chunk<? extends ATTR> getChunk(@NotNull ChunkSource.GetContext context, @NotNull OrderedKeys orderedKeys)Description copied from interface:ChunkSource
Returns a chunk of data corresponding to the keys from the givenOrderedKeys
.- Specified by:
getChunk
in interfaceChunkSource<ATTR extends Attributes.Any>
- Specified by:
getChunk
in interfaceDefaultChunkSource<ATTR extends Attributes.Any>
- Specified by:
getChunk
in interfaceDefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk. In particular, the Context may be used to provide a Chunk data poolorderedKeys
- AnOrderedKeys
representing the keys to be fetched- Returns:
- A chunk of data corresponding to the keys from the given
OrderedKeys
-
getChunk
@NotNull default Chunk<? extends ATTR> getChunk(@NotNull ChunkSource.GetContext context, long firstKey, long lastKey)Description copied from interface:ChunkSource
Same asChunkSource.getChunk(GetContext, OrderedKeys)
, except that you pass in the begin and last keys representing the begin and last (inclusive) keys of a single range rather than anOrderedKeys
. Typically you want to call this only if you don't have anOrderedKeys
, such as during anOrderedKeys.forAllLongRanges(LongRangeConsumer)
call. In this case, it allows you to avoid creating an intermediaryOrderedKeys
object.- Specified by:
getChunk
in interfaceChunkSource<ATTR extends Attributes.Any>
- Specified by:
getChunk
in interfaceDefaultChunkSource<ATTR extends Attributes.Any>
- Specified by:
getChunk
in interfaceDefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk. In particular, the Context may be used to provide a Chunk data poolfirstKey
- The beginning key (inclusive) of the range to fetch in the chunklastKey
- The last key (inclusive) of the range to fetch in the chunk
-
fillChunk
default void fillChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull OrderedKeys orderedKeys)Description copied from interface:ChunkSource
Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys
.- Specified by:
fillChunk
in interfaceChunkSource<ATTR extends Attributes.Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk.destination
- The chunk to be populated according toorderedKeys
. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,orderedKeys.size()).orderedKeys
- AnOrderedKeys
representing the keys to be fetched
-
fillChunkAppend
default void fillChunkAppend(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull OrderedKeys.Iterator orderedKeysIterator)Description copied from interface:PagingChunkSource
Similar to
ChunkSource.fillChunk(FillContext, WritableChunk, OrderedKeys)
, except that the values from the ChunkSource are appended todestination
, rather than placed at the beginning.The values to fill into
destination
are specified byorderedKeysIterator
, whoseOrderedKeys.firstKey()
must exist, and must be represented by thisPagingChunkSource
(modulo {#link @mask}), otherwise results are undefined.No more than the elements in
orderedKeysIterator
, which are on the same page asOrderedKeys.firstKey()
, have their values appended todestination
, and consumed fromorderedKeysIterator
. Keys are on the same page when the bits outside ofPagingChunkSource.mask()
are identical.- Specified by:
fillChunkAppend
in interfacePagingChunkSource<ATTR extends Attributes.Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk. In particular, the Context may be used to provide a Chunk data pooldestination
- The chunk to append the results to.orderedKeysIterator
- The iterator to the ordered keys, which contain at least the keys to extract from thisChunkSource
. The keys to extract will be at the beginning of iteration order.
-
doFillChunkAppend
@FinalDefault default void doFillChunkAppend(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, OrderedKeys orderedKeys, @NotNull Page<INNER_ATTR> page)This is a helper which is the same as a call tofillChunkAppend(com.illumon.iris.db.v2.sources.chunk.ChunkSource.FillContext, com.illumon.iris.db.v2.sources.chunk.WritableChunk<? super ATTR>, com.illumon.iris.db.v2.utils.OrderedKeys.Iterator)
, except that some of the initial work has already been done for the first call toPagingChunkSource.fillChunkAppend(FillContext, WritableChunk, OrderedKeys.Iterator)
which we don't want to repeat.
-