Class VectorChunkAdapter<ATTR extends Any>
java.lang.Object
io.deephaven.engine.table.impl.select.VectorChunkAdapter<ATTR>
- All Implemented Interfaces:
ChunkSource<ATTR>
,ChunkSource.WithPrev<ATTR>
,FillContextMaker
,GetContextMaker
,DefaultChunkSource<ATTR>
,DefaultChunkSource.WithPrev<ATTR>
public class VectorChunkAdapter<ATTR extends Any>
extends Object
implements DefaultChunkSource.WithPrev<ATTR>
This class wraps an inner ChunkSource holding a Vector. The purpose of doing so is to apply Vector#getDirect to the
underlying Vector values returned by the underlying ChunkSource. This is the strategy for implementing this class:
makeGetContext() - doesn't need to change. The default implementation in our parent, namely
DefaultChunkSource#makeGetContext, already does the right thing. getChunk() - likewise. makeFillContext() - We don't
need to add anything to the "inner" context, so we just delegate to inner and return its context fillContext() - We
first let the inner fill the chunk, then we overwrite each value (where non-null) with the result of
Vector#getDirect() invoked on that value.
-
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.impl.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any>
-
Field Summary
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fillChunk
(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence rowSequence) Populates the given destination chunk with data corresponding to the keys from the givenRowSequence
.void
fillPrevChunk
(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super ATTR> destination, @NotNull RowSequence rowSequence) Populates the given destination chunk with data corresponding to the keys from the givenRowSequence
.Get the most suitableChunkType
for use with this ChunkSource.makeFillContext
(int chunkCapacity, SharedContext sharedContext) Allocate a newChunkSource.FillContext
for filling chunks from thisFillContextMaker
, typically aChunkSource
.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.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeGetContext
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFilling, getPrevSource
Methods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContext
Methods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContext
-
Constructor Details
-
VectorChunkAdapter
-
-
Method Details
-
getChunkType
Description copied from interface:ChunkSource
Get the most suitableChunkType
for use with this ChunkSource.- Specified by:
getChunkType
in interfaceChunkSource<ATTR extends Any>
- Returns:
- The ChunkType
-
fillChunk
public void fillChunk(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull @NotNull RowSequence rowSequence) Description copied from interface:ChunkSource
Populates the given destination chunk with data corresponding to the keys from the givenRowSequence
.- Specified by:
fillChunk
in interfaceChunkSource<ATTR extends Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk.destination
- The chunk to be populated according torowSequence
. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).rowSequence
- AnRowSequence
representing the keys to be fetched
-
fillPrevChunk
public void fillPrevChunk(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super ATTR> destination, @NotNull @NotNull RowSequence rowSequence) Description copied from interface:ChunkSource.WithPrev
Populates the given destination chunk with data corresponding to the keys from the givenRowSequence
.- Specified by:
fillPrevChunk
in interfaceChunkSource.WithPrev<ATTR extends Any>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk.destination
- The chunk to be populated according torowSequence
. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).rowSequence
- AnRowSequence
representing the keys to be fetched
-