Interface ChunkColumnSource<T>
- Type Parameters:
T- the data type of the column source
- All Superinterfaces:
ChunkSource<Values>,ChunkSource.WithPrev<Values>,ColumnSource<T>,ElementSource<T>,FillContextMaker,GetContextMaker,Releasable,TupleExporter<T>,TupleSource<T>
- All Known Implementing Classes:
ByteChunkColumnSource,CharChunkColumnSource,DoubleChunkColumnSource,FloatChunkColumnSource,IntChunkColumnSource,LongChunkColumnSource,ObjectChunkColumnSource,ShortChunkColumnSource
An immutable ColumnSource that is backed by chunks.
The owner of the column source may append chunks to with the addChunk call.
-
Nested Class Summary
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.TupleExporter
TupleExporter.ExportElementFunction<TUPLE_TYPE> -
Field Summary
Fields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend a chunk of data to this column source.default voidclear()Reset the column source to be ready for reuse.voidclear(boolean closeChunks) Reset the column source to be ready for reuse.longgetSize()Get the size of this column source (one more than the last valid row key).static ChunkColumnSource<?>Create a new ChunkColumnSource for the given chunk type and data type.static ChunkColumnSource<?>make(ChunkType chunkType, Class<?> dataType, gnu.trove.list.array.TLongArrayList sharedOffsetForData) Create a new ChunkColumnSource for the given chunk type and data type.static ChunkColumnSource<?>make(ChunkType chunkType, Class<?> dataType, Class<?> componentType, gnu.trove.list.array.TLongArrayList sharedOffsetForData) Create a new ChunkColumnSource for the given chunk type and data type.static <T> ChunkColumnSource<T>Create a new ChunkColumnSource for the given chunk type and data type.Methods inherited from interface io.deephaven.engine.table.ChunkSource
fillChunk, getChunk, getChunkMethods inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
fillPrevChunk, getPrevChunk, getPrevChunkMethods inherited from interface io.deephaven.engine.table.ColumnSource
allowsReinterpret, 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.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
makeFillContext, makeFillContextMethods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext, makeGetContextMethods inherited from interface io.deephaven.engine.table.TupleExporter
exportAllReinterpretedTo, exportAllReinterpretedTo, exportAllTo, exportElementReinterpretedMethods inherited from interface io.deephaven.engine.table.TupleSource
createTupleFromReinterpretedValues
-
Method Details
-
make
Create a new ChunkColumnSource for the given chunk type and data type.- Parameters:
chunkType- the type of chunkdataType- the datatype for the newly created column source- Returns:
- an empty ChunkColumnSource
-
make
static <T> ChunkColumnSource<T> make(ChunkType chunkType, Class<T> dataType, Class<?> componentType) Create a new ChunkColumnSource for the given chunk type and data type.- Parameters:
chunkType- the type of chunkdataType- the datatype for the newly created column sourcecomponentType- the component type for the newly created column source (only applies to Objects)- Returns:
- an empty ChunkColumnSource
-
make
static ChunkColumnSource<?> make(ChunkType chunkType, Class<?> dataType, gnu.trove.list.array.TLongArrayList sharedOffsetForData) Create a new ChunkColumnSource for the given chunk type and data type.- Parameters:
chunkType- the type of chunkdataType- the datatype for the newly created column sourcesharedOffsetForData- an array list representing the shared offsets for data across several ChunkColumnSources- Returns:
- an empty ChunkColumnSource
-
make
static ChunkColumnSource<?> make(ChunkType chunkType, Class<?> dataType, Class<?> componentType, gnu.trove.list.array.TLongArrayList sharedOffsetForData) Create a new ChunkColumnSource for the given chunk type and data type.- Parameters:
chunkType- the type of chunkdataType- the datatype for the newly created column sourcecomponentType- the component type for the newly created column source (only applies to Objects)sharedOffsetForData- an array list representing the shared offsets for data across several ChunkColumnSources- Returns:
- an empty ChunkColumnSource
-
addChunk
Append a chunk of data to this column source. The chunk must not be empty (i.e., the size must be greater than zero).- Parameters:
chunk- the chunk of data to add
-
clear
Reset the column source to be ready for reuse.Clear will discard the currently held chunks. This should not be called if a table will continue to reference the column source, as it violates the immutability contract.
This method is equivalent to calling
clear(boolean)withtruefor thecloseChunksparameter. -
clear
void clear(boolean closeChunks) Reset the column source to be ready for reuse.Clear will discard the currently held chunks. This should not be called if a table will continue to reference the column source, as it violates the immutability contract.
- Parameters:
closeChunks- If true, close the chunks that are currently held by this column source
-
getSize
long getSize()Get the size of this column source (one more than the last valid row key).- Returns:
- the size of this column source
-