Class WritableRedirectedColumnSource<T>
java.lang.Object
io.deephaven.engine.table.impl.AbstractColumnSource<T>
io.deephaven.engine.table.impl.sources.RedirectedColumnSource<T>
io.deephaven.engine.table.impl.sources.WritableRedirectedColumnSource<T>
- All Implemented Interfaces:
ChunkSink<Values>,ChunkSource<Values>,ChunkSource.WithPrev<Values>,ColumnSource<T>,ElementSource<T>,FillContextMaker,GetContextMaker,DefaultChunkSource<Values>,DefaultChunkSource.WithPrev<Values>,PushdownFilterMatcher,ConvertibleTimeSource,UngroupableColumnSource,Releasable,TupleExporter<T>,TupleSource<T>,WritableColumnSource<T>
public class WritableRedirectedColumnSource<T>
extends RedirectedColumnSource<T>
implements WritableColumnSource<T>
A
ColumnSource that provides a redirected view into another ColumnSource by mapping keys using a
RowRedirection.-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.engine.table.impl.AbstractColumnSource
AbstractColumnSource.DefaultedImmutable<DATA_TYPE>, AbstractColumnSource.DefaultedMutable<DATA_TYPE>Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSink
ChunkSink.FillFromContextNested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Any>Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.sources.ConvertibleTimeSource
ConvertibleTimeSource.ZonedNested classes/interfaces inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any>Nested classes/interfaces inherited from interface io.deephaven.engine.table.TupleExporter
TupleExporter.ExportElementFunction<TUPLE_TYPE>Nested classes/interfaces inherited from interface io.deephaven.engine.table.WritableColumnSource
WritableColumnSource.ByteFiller, WritableColumnSource.CharFiller, WritableColumnSource.DoubleFiller, WritableColumnSource.FloatFiller, WritableColumnSource.IntFiller, WritableColumnSource.LongFiller, WritableColumnSource.ObjectFiller, WritableColumnSource.ShortFiller, WritableColumnSource.SinkFiller -
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.sources.RedirectedColumnSource
innerSource, rowRedirectionFields inherited from class io.deephaven.engine.table.impl.AbstractColumnSource
componentType, type, updateGraph, USE_RANGES_AVERAGE_RUN_LENGTHFields inherited from interface io.deephaven.engine.table.ChunkSink
DEFAULT_FILL_FROM_INSTANCEFields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAYFields inherited from interface io.deephaven.engine.table.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWritableRedirectedColumnSource(@NotNull RowRedirection rowRedirection, @NotNull ColumnSource<T> innerSource, long maxInnerIndex) Create a type-appropriate WritableRedirectedColumnSource for the suppliedWritableRowRedirectionand innerColumnSource. -
Method Summary
Modifier and TypeMethodDescription<ALTERNATE_DATA_TYPE>
booleanallowsReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Test if a reinterpret call will succeed.protected <ALTERNATE_DATA_TYPE>
ColumnSource<ALTERNATE_DATA_TYPE> doReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Supply allowed reinterpret results.voidensureCapacity(long capacity, boolean nullFill) Ensure that this WritableColumnSource can accept row keys in range[0, capacity).voidfillFromChunk(@NotNull ChunkSink.FillFromContext context, @NotNull Chunk<? extends Values> src, @NotNull RowSequence rowSequence) Our default, inefficient, implementation.voidfillFromChunkUnordered(@NotNull ChunkSink.FillFromContext context, @NotNull Chunk<? extends Values> src, @NotNull LongChunk<RowKeys> keys) Fills the ChunkSink with data from the source, with data corresponding to the keys from the given key chunk.makeFillFromContext(int chunkCapacity) static <T> WritableColumnSource<T> maybeRedirect(@NotNull RowRedirection rowRedirection, @NotNull WritableColumnSource<T> innerSource, long maxInnerIndex) Redirect the innerSource if it is not agnostic to redirection.voidset(long key, byte value) voidset(long key, char value) voidset(long key, double value) voidset(long key, float value) voidset(long key, int value) voidset(long key, long value) voidset(long key, short value) voidvoidsetNull(long key) Methods inherited from class io.deephaven.engine.table.impl.sources.RedirectedColumnSource
alwaysRedirect, fillChunk, fillPrevChunk, get, getBoolean, getByte, getChar, getComponentType, getDouble, getFloat, getInnerSource, getInt, getLong, getPrev, getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShort, getRowRedirection, getShort, getUngrouped, getUngroupedBoolean, getUngroupedByte, getUngroupedChar, getUngroupedDouble, getUngroupedFloat, getUngroupedInt, getUngroupedLong, getUngroupedPrev, getUngroupedPrevBoolean, getUngroupedPrevByte, getUngroupedPrevChar, getUngroupedPrevDouble, getUngroupedPrevFloat, getUngroupedPrevInt, getUngroupedPrevLong, getUngroupedPrevShort, getUngroupedPrevSize, getUngroupedShort, getUngroupedSize, isImmutable, isStateless, isUngroupable, makeFillContext, maybeRedirect, releaseCachedResources, startTrackingPrevValues, supportsTimeConversion, toEpochNano, toInstant, toLocalDate, toLocalTime, toZonedDateTimeMethods inherited from class io.deephaven.engine.table.impl.AbstractColumnSource
defaultFillChunk, defaultFillPrevChunk, estimatePushdownFilterCost, getPrevSource, getType, makePushdownFilterContext, match, pushdownFilter, pushdownManager, reinterpretMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.ChunkSource
fillChunkMethods inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
fillPrevChunkMethods inherited from interface io.deephaven.engine.table.ColumnSource
cast, cast, cast, cast, createPreviousTuple, createTuple, createTupleFromValues, exportAllTo, exportElement, exportElement, getChunkType, getComponentType, getPrevSource, getType, isImmutable, isStateless, match, reinterpret, releaseCachedResources, startTrackingPrevValues, tupleLengthMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeGetContextMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFillingMethods inherited from interface io.deephaven.engine.table.ElementSource
get, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getPrev, getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShort, getShortMethods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContextMethods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContextMethods inherited from interface io.deephaven.engine.table.TupleExporter
exportAllReinterpretedTo, exportAllReinterpretedTo, exportAllTo, exportElementReinterpretedMethods inherited from interface io.deephaven.engine.table.TupleSource
createTupleFromReinterpretedValuesMethods inherited from interface io.deephaven.engine.table.impl.sources.UngroupableColumnSource
getUngroupedPrevSize, getUngroupedSizeMethods inherited from interface io.deephaven.engine.table.WritableColumnSource
ensureCapacity, setNull
-
Constructor Details
-
WritableRedirectedColumnSource
protected WritableRedirectedColumnSource(@NotNull @NotNull RowRedirection rowRedirection, @NotNull @NotNull ColumnSource<T> innerSource, long maxInnerIndex) Create a type-appropriate WritableRedirectedColumnSource for the suppliedWritableRowRedirectionand innerColumnSource.- Parameters:
rowRedirection- The row redirection to useinnerSource- The column source to redirectmaxInnerIndex- The maximum row key available in innerSource
-
-
Method Details
-
maybeRedirect
public static <T> WritableColumnSource<T> maybeRedirect(@NotNull @NotNull RowRedirection rowRedirection, @NotNull @NotNull WritableColumnSource<T> innerSource, long maxInnerIndex) Redirect the innerSource if it is not agnostic to redirection. Otherwise, return the innerSource.- Parameters:
rowRedirection- The row redirection to useinnerSource- The column source to redirectmaxInnerIndex- The maximum row key available in innerSource
-
setNull
public void setNull(long key) - Specified by:
setNullin interfaceWritableColumnSource<T>
-
set
- Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, byte value) - Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, char value) - Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, double value) - Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, float value) - Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, int value) - Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, long value) - Specified by:
setin interfaceWritableColumnSource<T>
-
set
public void set(long key, short value) - Specified by:
setin interfaceWritableColumnSource<T>
-
ensureCapacity
public void ensureCapacity(long capacity, boolean nullFill) Description copied from interface:WritableColumnSourceEnsure that this WritableColumnSource can accept row keys in range[0, capacity).- Specified by:
ensureCapacityin interfaceWritableColumnSource<T>- Parameters:
capacity- The new minimum capacitynullFill- Whether data should be "null-filled". If true, get operations at row keys that have not been set will return the appropriate null value; otherwise such gets produce undefined results.
-
makeFillFromContext
Description copied from interface:WritableColumnSourceProvide a default, emptyChunkSink.FillFromContextfor use with our defaultWritableColumnSource.fillFromChunk(io.deephaven.engine.table.ChunkSink.FillFromContext, io.deephaven.chunk.Chunk<? extends io.deephaven.chunk.attributes.Values>, io.deephaven.engine.rowset.RowSequence).- Specified by:
makeFillFromContextin interfaceChunkSink<T>- Specified by:
makeFillFromContextin interfaceWritableColumnSource<T>
-
fillFromChunk
public void fillFromChunk(@NotNull @NotNull ChunkSink.FillFromContext context, @NotNull @NotNull Chunk<? extends Values> src, @NotNull @NotNull RowSequence rowSequence) Description copied from interface:WritableColumnSourceOur default, inefficient, implementation. Inheritors who care should provide a better implementation.- Specified by:
fillFromChunkin interfaceChunkSink<T>- Specified by:
fillFromChunkin interfaceWritableColumnSource<T>- Parameters:
context- A context containing all mutable/state related data used in writing the Chunk.src- The source of the datarowSequencerowSequence- AnRowSequencerepresenting the keys to be written
-
fillFromChunkUnordered
public void fillFromChunkUnordered(@NotNull @NotNull ChunkSink.FillFromContext context, @NotNull @NotNull Chunk<? extends Values> src, @NotNull @NotNull LongChunk<RowKeys> keys) Description copied from interface:ChunkSinkFills the ChunkSink with data from the source, with data corresponding to the keys from the given key chunk.- Specified by:
fillFromChunkUnorderedin interfaceChunkSink<T>- Specified by:
fillFromChunkUnorderedin interfaceWritableColumnSource<T>- Parameters:
context- A context containing all mutable/state related data used in writing the Chunk.src- The source of the dataRowSequencekeys- ALongChunkrepresenting the keys to be written
-
allowsReinterpret
public <ALTERNATE_DATA_TYPE> boolean allowsReinterpret(@NotNull @NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Description copied from interface:ColumnSourceTest if a reinterpret call will succeed.- Specified by:
allowsReinterpretin interfaceColumnSource<T>- Overrides:
allowsReinterpretin classRedirectedColumnSource<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 @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 classRedirectedColumnSource<T>- Parameters:
alternateDataType- The alternate data type- Returns:
- The resulting
ColumnSource
-