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>
,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.FillFromContext
Nested 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.Zoned
Nested 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, rowRedirection
Fields inherited from class io.deephaven.engine.table.impl.AbstractColumnSource
componentType, type, updateGraph, USE_RANGES_AVERAGE_RUN_LENGTH
Fields inherited from interface io.deephaven.engine.table.ChunkSink
DEFAULT_FILL_FROM_INSTANCE
Fields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
Fields inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAY
Fields inherited from interface io.deephaven.engine.table.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY
-
Constructor Summary
ModifierConstructorDescriptionprotected
WritableRedirectedColumnSource
(@NotNull RowRedirection rowRedirection, @NotNull ColumnSource<T> innerSource, long maxInnerIndex) Create a type-appropriate WritableRedirectedColumnSource for the suppliedWritableRowRedirection
and 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.void
ensureCapacity
(long capacity, boolean nullFill) Ensure that this WritableColumnSource can accept row keys in range[0, capacity)
.void
fillFromChunk
(@NotNull ChunkSink.FillFromContext context, @NotNull Chunk<? extends Values> src, @NotNull RowSequence rowSequence) Our default, inefficient, implementation.void
fillFromChunkUnordered
(@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.void
set
(long key, byte value) void
set
(long key, char value) void
set
(long key, double value) void
set
(long key, float value) void
set
(long key, int value) void
set
(long key, long value) void
set
(long key, short value) void
void
setNull
(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, toZonedDateTime
Methods inherited from class io.deephaven.engine.table.impl.AbstractColumnSource
defaultFillChunk, defaultFillPrevChunk, getPrevSource, getType, match, reinterpret
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.ChunkSource
fillChunk
Methods inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
fillPrevChunk
Methods 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, tupleLength
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeGetContext
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFilling
Methods 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, getShort
Methods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContext
Methods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext
Methods inherited from interface io.deephaven.engine.table.TupleExporter
exportAllReinterpretedTo, exportAllReinterpretedTo, exportAllTo, exportElementReinterpreted
Methods inherited from interface io.deephaven.engine.table.TupleSource
createTupleFromReinterpretedValues
Methods 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 suppliedWritableRowRedirection
and 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:
setNull
in interfaceWritableColumnSource<T>
-
set
- Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, byte value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, char value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, double value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, float value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, int value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, long value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
set
public void set(long key, short value) - Specified by:
set
in interfaceWritableColumnSource<T>
-
ensureCapacity
public void ensureCapacity(long capacity, boolean nullFill) Description copied from interface:WritableColumnSource
Ensure that this WritableColumnSource can accept row keys in range[0, capacity)
.- Specified by:
ensureCapacity
in 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:WritableColumnSource
Provide a default, emptyChunkSink.FillFromContext
for 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:
makeFillFromContext
in interfaceChunkSink<T>
- Specified by:
makeFillFromContext
in 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:WritableColumnSource
Our default, inefficient, implementation. Inheritors who care should provide a better implementation.- Specified by:
fillFromChunk
in interfaceChunkSink<T>
- Specified by:
fillFromChunk
in interfaceWritableColumnSource<T>
- Parameters:
context
- A context containing all mutable/state related data used in writing the Chunk.src
- The source of the datarowSequence
rowSequence
- AnRowSequence
representing 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:ChunkSink
Fills the ChunkSink with data from the source, with data corresponding to the keys from the given key chunk.- Specified by:
fillFromChunkUnordered
in interfaceChunkSink<T>
- Specified by:
fillFromChunkUnordered
in interfaceWritableColumnSource<T>
- Parameters:
context
- A context containing all mutable/state related data used in writing the Chunk.src
- The source of the dataRowSequence
keys
- ALongChunk
representing the keys to be written
-
allowsReinterpret
public <ALTERNATE_DATA_TYPE> boolean allowsReinterpret(@NotNull @NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Description copied from interface:ColumnSource
Test if a reinterpret call will succeed.- Specified by:
allowsReinterpret
in interfaceColumnSource<T>
- Overrides:
allowsReinterpret
in 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:AbstractColumnSource
Supply allowed reinterpret results. The default implementation handles the most common case to avoid code duplication.- Overrides:
doReinterpret
in classRedirectedColumnSource<T>
- Parameters:
alternateDataType
- The alternate data type- Returns:
- The resulting
ColumnSource
-