Class RegionedColumnSourceObjectWithDictionary<T,D,OFFSET_LOOKUP_CACHE extends OffsetLookupCache<T,ChunkSource.FillContext>>
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<T>
com.illumon.iris.db.v2.sources.AbstractDeferredGroupingColumnSource<DATA_TYPE>
com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObject<T,Attributes.Values>
com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObject.AsValues<T,D>
com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObjectWithDictionary<T,D,OFFSET_LOOKUP_CACHE>
- All Implemented Interfaces:
LongSizedDataStructure,ChunkSource<Attributes.Values>,ChunkSource.WithPrev<Attributes.Values>,DefaultChunkSource<Attributes.Values>,DefaultChunkSource.SupportsContiguousGet<Attributes.Values>,DefaultChunkSource.WithPrev<Attributes.Values>,FillContextMaker,GetContextMaker,PageStore<Attributes.Values,Attributes.Values,ColumnRegionObject<T,Attributes.Values>>,PagingChunkSource<Attributes.Values>,ColumnSource<T>,ColumnSourceGetDefaults.ForObject<T>,DeferredGroupingColumnSource<T>,ElementSource<T>,ImmutableColumnSource<T>,MakeRegion<Attributes.Values,ColumnRegionObject<T,Attributes.Values>>,RegionedColumnSource<T>,RegionedPageStore<Attributes.Values,Attributes.Values,ColumnRegionObject<T,Attributes.Values>>,SymbolTableSource<T>,Releasable,SizedColumnSource<T>,TupleExporter<T>,TupleSource<T>,Serializable
public class RegionedColumnSourceObjectWithDictionary<T,D,OFFSET_LOOKUP_CACHE extends OffsetLookupCache<T,ChunkSource.FillContext>> extends RegionedColumnSourceObject.AsValues<T,D> implements ColumnSourceGetDefaults.ForObject<T>, SymbolTableSource<T>
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObject
RegionedColumnSourceObject.AsValues<T,D>, RegionedColumnSourceObject.FillContextNested classes/interfaces inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
AbstractColumnSource.DefaultedImmutable<DATA_TYPE>, AbstractColumnSource.DefaultedMutable<DATA_TYPE>, AbstractColumnSource.IsSerializableNested 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 inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
componentType, groupToRange, typeFields 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.chunk.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.regioned.RegionedColumnSource
ELEMENT_INDEX_TO_SUB_REGION_ELEMENT_INDEX_MASK, MAXIMUM_REGION_COUNT, REGION_CAPACITY_IN_ELEMENTS, REGION_INDEX_ADDRESS_BITS, SUB_REGION_ELEMENT_INDEX_ADDRESS_BITSFields inherited from interface com.illumon.iris.db.v2.sources.regioned.RegionedPageStore
REGION_MASK, REGION_MASK_NUM_BITSFields inherited from interface com.illumon.iris.db.v2.sources.regioned.SymbolTableSource
ID_COLUMN_NAME, SYMBOL_COLUMN_NAME -
Constructor Summary
Constructors Constructor Description RegionedColumnSourceObjectWithDictionary(Class<T> dataType, ObjectDecoder<D> decoder, ColumnRegionObjectCached.CacheFactory<T,OFFSET_LOOKUP_CACHE> cacheFactory) -
Method Summary
Modifier and Type Method Description intaddRegion(com.illumon.dataobjects.ColumnDefinition<?> columnDefinition, ColumnLocation<?> columnLocation)Add a region to this regioned column source.<ALTERNATE_DATA_TYPE>
booleanallowsReinterpret(Class<ALTERNATE_DATA_TYPE> alternateDataType)Test if a reinterpret call will succeed.RegionedColumnSource<T>asDictionary()protected <ALTERNATE_DATA_TYPE>
ColumnSource<ALTERNATE_DATA_TYPE>doReinterpret(Class<ALTERNATE_DATA_TYPE> alternateDataType)Supply allowed reinterpret results.voidfillChunk(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys)Use the more efficient fill chunk implementation, rather than the default which uses get().voidfillPrevChunk(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys)We are immutable, so stick with the efficient fill chunk even when getting prev.ColumnRegionObjectCached.CacheFactory<T,OFFSET_LOOKUP_CACHE>getCacheFactory()REGION_TYPEgetNullRegion()REGION_TYPEgetRegion(int regionIndex)Map from a region index to its corresponding region.intgetRegionCount()Get the number of regions.QueryTablegetStaticSymbolTable(ReadOnlyIndex sourceIndex, boolean useLookupCaching)Get a staticTableview of this SymbolTableSource's symbol table, providing a many:1 or 1:1 mapping of uniquelongidentifiers to the symbol values in this source.TablegetSymbolTable(QueryTable sourceTable, boolean useLookupCaching)Get aTableview of this SymbolTableSource's symbol table, providing a many:1 or 1:1 mapping of uniquelongidentifiers to the symbol values in this source.booleanhasSymbolTable(ReadOnlyIndex sourceIndex)voidreleaseCachedResources()Release any resources held for caching purposes.Methods inherited from class com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObject.AsValues
get, makeFillContext, makeRegionMethods inherited from class com.illumon.iris.db.v2.sources.AbstractDeferredGroupingColumnSource
getGroupingProvider, getGroupToRange, getGroupToRange, setGroupingProviderMethods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
computeFlattenedGroupings, defaultFillChunk, forEachGroup, forEachResponsiveGroup, getComponentType, getNativeType, getType, getValuesMapping, groupingToFlatSources, groupingToFlatSources, groupingToFlatSources, isSerializable, match, reinterpret, setGroupToRangeMethods 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.WithPrev
fillPrevChunkMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getComponentType, getGroupToRange, getGroupToRange, getNativeType, getPrevSource, getType, getValuesMapping, match, reinterpret, releaseCachedResources, startTrackingPrevValuesMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.ForObject
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunkByFilling, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFillingMethods inherited from interface com.illumon.iris.db.v2.sources.DeferredGroupingColumnSource
getGroupingProvider, setGroupingProvider, setGroupToRangeMethods 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.ImmutableColumnSource
getPrev, getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShort, isImmutableMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.page.PageStore
doFillChunkAppend, fillChunkAppend, getChunk, getChunkMethods inherited from interface com.illumon.iris.db.v2.sources.regioned.RegionedPageStore
getPageContaining, lookupRegion, mask, sizeMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleExporter
exportElementReinterpretedMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleSource
createTupleFromReinterpretedValues
-
Constructor Details
-
RegionedColumnSourceObjectWithDictionary
public RegionedColumnSourceObjectWithDictionary(@NotNull Class<T> dataType, @NotNull ObjectDecoder<D> decoder, @Nullable ColumnRegionObjectCached.CacheFactory<T,OFFSET_LOOKUP_CACHE> cacheFactory)
-
-
Method Details
-
getCacheFactory
-
allowsReinterpret
public <ALTERNATE_DATA_TYPE> boolean allowsReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType)Description copied from interface:ColumnSourceTest if a reinterpret call will succeed.- Specified by:
allowsReinterpretin interfaceColumnSource<T>- Overrides:
allowsReinterpretin classAbstractColumnSource<T>- Parameters:
alternateDataType- The alternative type to consider- Returns:
- If a reinterpret on this column source with the supplied alternateDataType will succeed.
-
doReinterpret
protected <ALTERNATE_DATA_TYPE> ColumnSource<ALTERNATE_DATA_TYPE> doReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType)Description copied from class:AbstractColumnSourceSupply allowed reinterpret results. The default implementation handles the most common case to avoid code duplication.- Overrides:
doReinterpretin classAbstractColumnSource<T>- Parameters:
alternateDataType- The alternate data type- Returns:
- The resulting
ColumnSource
-
hasSymbolTable
- Specified by:
hasSymbolTablein interfaceSymbolTableSource<T>- Parameters:
sourceIndex- TheIndexwhose keys must be mappable- Returns:
- Whether this SymbolTableSource can provide a symbol table that covers all keys in
sourceIndex.
-
asDictionary
-
getStaticSymbolTable
public QueryTable getStaticSymbolTable(@NotNull ReadOnlyIndex sourceIndex, boolean useLookupCaching)Description copied from interface:SymbolTableSourceGet a static
Tableview of this SymbolTableSource's symbol table, providing a many:1 or 1:1 mapping of uniquelongidentifiers to the symbol values in this source.- Specified by:
getStaticSymbolTablein interfaceSymbolTableSource<T>- Parameters:
sourceIndex- TheIndexwhose keys must be mappable via the resultTable's identifier columnuseLookupCaching- Whether symbol lookups performed to generate the symbol table should apply caching- Returns:
- The symbol table
-
getSymbolTable
Description copied from interface:SymbolTableSourceGet a
Tableview of this SymbolTableSource's symbol table, providing a many:1 or 1:1 mapping of uniquelongidentifiers to the symbol values in this source.The result will be refreshing if
tableis a refreshingDynamicTable.- Specified by:
getSymbolTablein interfaceSymbolTableSource<T>- Parameters:
sourceTable- TheQueryTablewhoseIndexkeys must be mappable via the resultTable's identifier columnuseLookupCaching- Whether symbol lookups performed to generate the symbol table should apply caching- Returns:
- The symbol table
-
addRegion
@OverridingMethodsMustInvokeSuper public int addRegion(@NotNull com.illumon.dataobjects.ColumnDefinition<?> columnDefinition, @NotNull ColumnLocation<?> columnLocation)Description copied from interface:RegionedColumnSourceAdd a region to this regioned column source. Elements in this region are ordered after elements in other regions added previously.- Specified by:
addRegionin interfaceRegionedColumnSource<DATA_TYPE>- Parameters:
columnDefinition- The column definition for this column source (potentially varies by region)columnLocation- The column location for the region being added- Returns:
- The index assigned to the added region
-
getRegionCount
public final int getRegionCount()Description copied from interface:RegionedPageStoreGet the number of regions.- Specified by:
getRegionCountin interfaceRegionedPageStore<DATA_TYPE,ATTR extends Attributes.Values,REGION_TYPE extends ColumnRegion<ATTR>>- Returns:
- The number of regions that have been added
-
getRegion
public REGION_TYPE getRegion(int regionIndex)Description copied from interface:RegionedPageStoreMap from a region index to its corresponding region.- Specified by:
getRegionin interfaceRegionedPageStore<DATA_TYPE,ATTR extends Attributes.Values,REGION_TYPE extends ColumnRegion<ATTR>>- Parameters:
regionIndex- The region index- Returns:
- The region for the supplied region index
-
releaseCachedResources
@OverridingMethodsMustInvokeSuper public void releaseCachedResources()Description copied from interface:ColumnSourceRelease any resources held for caching purposes. Implementations need not guarantee that concurrent accesses are correct, as the purpose of this method is to ensure cleanup for column sources that will no longer be used.- Specified by:
releaseCachedResourcesin interfaceColumnSource<DATA_TYPE>- Specified by:
releaseCachedResourcesin interfaceReleasable
-
getNullRegion
@NotNull public final REGION_TYPE getNullRegion() -
fillChunk
public void fillChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys)Use the more efficient fill chunk implementation, rather than the default which uses get().- Specified by:
fillChunkin interfaceChunkSource<DATA_TYPE>- Specified by:
fillChunkin interfacePageStore<DATA_TYPE,ATTR extends Attributes.Values,REGION_TYPE extends ColumnRegion<ATTR>>- Overrides:
fillChunkin classAbstractColumnSource<DATA_TYPE>- 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- AnOrderedKeysrepresenting the keys to be fetched
-
fillPrevChunk
public void fillPrevChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys)We are immutable, so stick with the efficient fill chunk even when getting prev.- Specified by:
fillPrevChunkin interfaceChunkSource.WithPrev<DATA_TYPE>- Overrides:
fillPrevChunkin classAbstractColumnSource<DATA_TYPE>- 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- AnOrderedKeysrepresenting the keys to be fetched
-