Class ContiguousWritableRowRedirection
java.lang.Object
io.deephaven.engine.table.impl.util.ContiguousWritableRowRedirection
- All Implemented Interfaces:
ChunkSink<RowKeys>
,ChunkSource<RowKeys>
,ChunkSource.WithPrev<RowKeys>
,FillContextMaker
,GetContextMaker
,DefaultChunkSource<RowKeys>
,DefaultChunkSource.WithPrev<RowKeys>
,FillUnordered<RowKeys>
,RowRedirection
,WritableRowRedirection
-
Nested Class Summary
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.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any>
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.util.WritableRowRedirection
WritableRowRedirection.Factory
-
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
Fields inherited from interface io.deephaven.engine.table.impl.util.WritableRowRedirection
DEFAULT_FILL_FROM_INSTANCE, FACTORY
-
Constructor Summary
ConstructorDescriptionContiguousWritableRowRedirection
(int initialCapacity) ContiguousWritableRowRedirection
(long[] redirections) -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillChunk
(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequence
and write the result to aWritableLongChunk
.void
fillPrevChunk
(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequence
using previous values and write the result to aWritableLongChunk
.long
get
(long outerRowKey) Simple redirected lookup.long
getPrev
(long outerRowKey) Simple redirected lookup, using previous values.long
put
(long outerRowKey, long innerRowKey) Add or change a mapping fromouterRowKey
toinnerRowKey
.long
remove
(long outerRowKey) Remove a mapping fromouterRowKey
.void
Initiate previous value tracking.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, 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
Methods inherited from interface io.deephaven.engine.table.impl.util.RowRedirection
ascendingMapping, fillChunkUnordered, fillPrevChunkUnordered, getChunkType, isWritable, providesFillUnordered, writableCast
Methods inherited from interface io.deephaven.engine.table.impl.util.WritableRowRedirection
applyShift, fillFromChunk, fillFromChunkUnordered, makeFillFromContext, putVoid, removeAll, removeAllUnordered, removeVoid
-
Constructor Details
-
ContiguousWritableRowRedirection
public ContiguousWritableRowRedirection(int initialCapacity) -
ContiguousWritableRowRedirection
public ContiguousWritableRowRedirection(long[] redirections)
-
-
Method Details
-
put
public long put(long outerRowKey, long innerRowKey) Description copied from interface:WritableRowRedirection
Add or change a mapping fromouterRowKey
toinnerRowKey
.- Specified by:
put
in interfaceWritableRowRedirection
- Parameters:
outerRowKey
- The outer row key to map frominnerRowKey
- The inner row key to map to- Returns:
- The inner row key previously mapped from
outerRowKey
, orRowSequence.NULL_ROW_KEY
if there was no mapping
-
get
public long get(long outerRowKey) Description copied from interface:RowRedirection
Simple redirected lookup.- Specified by:
get
in interfaceRowRedirection
- Parameters:
outerRowKey
- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEY
if no mapping exists
-
fillChunk
public void fillChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull RowSequence outerRowKeys) Description copied from interface:RowRedirection
Lookup each element in aRowSequence
and write the result to aWritableLongChunk
.- Specified by:
fillChunk
in interfaceChunkSource<RowKeys>
- Specified by:
fillChunk
in interfaceRowRedirection
- Parameters:
fillContext
- Thefill context
innerRowKeys
- The resultWritableLongChunk
outerRowKeys
- The row keys to lookup in this RowRedirection
-
getPrev
public long getPrev(long outerRowKey) Description copied from interface:RowRedirection
Simple redirected lookup, using previous values.- Specified by:
getPrev
in interfaceRowRedirection
- Parameters:
outerRowKey
- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEY
if no mapping exists
-
fillPrevChunk
public void fillPrevChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull RowSequence outerRowKeys) Description copied from interface:RowRedirection
Lookup each element in aRowSequence
using previous values and write the result to aWritableLongChunk
.- Specified by:
fillPrevChunk
in interfaceChunkSource.WithPrev<RowKeys>
- Specified by:
fillPrevChunk
in interfaceRowRedirection
- Parameters:
fillContext
- Thefill context
innerRowKeys
- The resultWritableLongChunk
outerRowKeys
- The row keys to lookup in this RowRedirection
-
remove
public long remove(long outerRowKey) Description copied from interface:WritableRowRedirection
Remove a mapping fromouterRowKey
.- Specified by:
remove
in interfaceWritableRowRedirection
- Parameters:
outerRowKey
- The outer row key to unmap- Returns:
- The inner row key previously mapped from
outerRowKey
, orRowSequence.NULL_ROW_KEY
if there was no mapping
-
startTrackingPrevValues
public void startTrackingPrevValues()Description copied from interface:WritableRowRedirection
Initiate previous value tracking.- Specified by:
startTrackingPrevValues
in interfaceWritableRowRedirection
-
toString
-