Class RegionedColumnSourceObject.AsValues<T,​D>

java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<DATA_TYPE>
com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObject<T,​Attributes.Values>
com.illumon.iris.db.v2.sources.regioned.RegionedColumnSourceObject.AsValues<T,​D>
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>, ElementSource<T>, ImmutableColumnSource<T>, MakeRegion<Attributes.Values,​ColumnRegionObject<T,​Attributes.Values>>, RegionedColumnSource<T>, RegionedPageStore<Attributes.Values,​Attributes.Values,​ColumnRegionObject<T,​Attributes.Values>>, Releasable, SizedColumnSource<T>, TupleExporter<T>, TupleSource<T>, Serializable
Direct Known Subclasses:
RegionedColumnSourceObjectWithDictionary
Enclosing class:
RegionedColumnSourceObject<T,​ATTR extends Attributes.Values>

public static class RegionedColumnSourceObject.AsValues<T,​D>
extends RegionedColumnSourceObject<T,​Attributes.Values>
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • get

      public T get​(long elementIndex)
      Description copied from interface: ElementSource
      Get the value from the source. This may return boxed values for basic types.
      Parameters:
      elementIndex - the location in index space to get the value from.
      Returns:
      the value at the index, potentially null.
    • makeRegion

      public ColumnRegionObject<T,​Attributes.Values> makeRegion​(@NotNull com.illumon.dataobjects.ColumnDefinition<?> columnDefinition, @NotNull ColumnLocation<?> columnLocation, int regionIndex)
      Description copied from interface: MakeRegion
      Get a new or re-usable column region appropriate for this source.
      Parameters:
      columnDefinition - The ColumnDefinition
      columnLocation - The ColumnLocation
      regionIndex - The index of the region to add.
      Returns:
      A new or re-usable column region appropriate for this source and the supplied parameters. A null value may be returned, which should be interpreted to mean use a special null column, which has size() 0 and is full of the appropriate "null" value for the column's type.
    • makeFillContext

      public RegionedColumnSourceObject.FillContext makeFillContext​(int chunkCapacity, @Nullable SharedContext sharedContext)
      Description copied from interface: FillContextMaker
      Allocate a new ChunkSource.FillContext for filling chunks from this FillContextMaker, typically a ChunkSource.
      Parameters:
      chunkCapacity - The maximum size of any WritableChunk that will be filled with this context
      sharedContext - Shared store of intermediate results.
      Returns:
      A context for use with fill operations
    • addRegion

      @OverridingMethodsMustInvokeSuper public int addRegion​(@NotNull com.illumon.dataobjects.ColumnDefinition<?> columnDefinition, @NotNull ColumnLocation<?> columnLocation)
      Description copied from interface: RegionedColumnSource
      Add a region to this regioned column source. Elements in this region are ordered after elements in other regions added previously.
      Specified by:
      addRegion in interface RegionedColumnSource<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: RegionedPageStore
      Get the number of regions.
      Specified by:
      getRegionCount in interface RegionedPageStore<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: RegionedPageStore
      Map from a region index to its corresponding region.
      Specified by:
      getRegion in interface RegionedPageStore<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: ColumnSource
      Release 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:
      releaseCachedResources in interface ColumnSource<DATA_TYPE>
      Specified by:
      releaseCachedResources in interface Releasable
    • 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:
      fillChunk in interface ChunkSource<DATA_TYPE>
      Specified by:
      fillChunk in interface PageStore<DATA_TYPE,​ATTR extends Attributes.Values,​REGION_TYPE extends ColumnRegion<ATTR>>
      Overrides:
      fillChunk in class AbstractColumnSource<DATA_TYPE>
      Parameters:
      context - A context containing all mutable/state related data used in retrieving the Chunk.
      destination - The chunk to be populated according to orderedKeys. 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 - An OrderedKeys representing 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:
      fillPrevChunk in interface ChunkSource.WithPrev<DATA_TYPE>
      Overrides:
      fillPrevChunk in class AbstractColumnSource<DATA_TYPE>
      Parameters:
      context - A context containing all mutable/state related data used in retrieving the Chunk.
      destination - The chunk to be populated according to orderedKeys. 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 - An OrderedKeys representing the keys to be fetched