Class InverseWrappedRowSetRowRedirection
java.lang.Object
io.deephaven.engine.table.impl.util.InverseWrappedRowSetRowRedirection
- All Implemented Interfaces:
ChunkSource<RowKeys>,ChunkSource.WithPrev<RowKeys>,FillContextMaker,GetContextMaker,DefaultChunkSource<RowKeys>,DefaultChunkSource.WithPrev<RowKeys>,FillUnordered<RowKeys>,RowRedirection
-
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_ARRAYFields inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionInverseWrappedRowSetRowRedirection(RowSet wrappedRowSet) This class accepts aRowSetand attempts to cast to aTrackingRowSetifgetPrev(long)orfillPrevChunk(FillContext, WritableChunk, RowSequence)is called. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this RowRedirection is guaranteed to map outer keys in ascending order to inner keys in ascending order; then return true; all other redirections must return false.voidfillChunk(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> mappedKeysOut, @NotNull RowSequence keysToMap) Lookup each element in aRowSequenceand write the result to aWritableLongChunk.voidfillPrevChunk(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> mappedKeysOut, @NotNull RowSequence keysToMap) Lookup each element in aRowSequenceusing previous values and write the result to aWritableLongChunk.longget(long key) Simple redirected lookup.longgetPrev(long key) Simple redirected lookup, using previous values.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFilling, getPrevSourceMethods 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.impl.util.RowRedirection
fillChunkUnordered, fillPrevChunkUnordered, getChunkType, isWritable, providesFillUnordered, writableCast
-
Constructor Details
-
InverseWrappedRowSetRowRedirection
This class accepts aRowSetand attempts to cast to aTrackingRowSetifgetPrev(long)orfillPrevChunk(FillContext, WritableChunk, RowSequence)is called. Calling these functions on a non-tracking RowSet will result in aClassCastException.- Parameters:
wrappedRowSet- the RowSet (or TrackingRowSet) to use as the redirection source
-
-
Method Details
-
ascendingMapping
public boolean ascendingMapping()Description copied from interface:RowRedirectionIf this RowRedirection is guaranteed to map outer keys in ascending order to inner keys in ascending order; then return true; all other redirections must return false.- Specified by:
ascendingMappingin interfaceRowRedirection- Returns:
- if our output maintains ascending order
-
get
public long get(long key) Description copied from interface:RowRedirectionSimple redirected lookup.- Specified by:
getin interfaceRowRedirection- Parameters:
key- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEYif no mapping exists
-
getPrev
public long getPrev(long key) Description copied from interface:RowRedirectionSimple redirected lookup, using previous values.- Specified by:
getPrevin interfaceRowRedirection- Parameters:
key- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEYif no mapping exists
-
fillChunk
public void fillChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> mappedKeysOut, @NotNull @NotNull RowSequence keysToMap) Description copied from interface:RowRedirectionLookup each element in aRowSequenceand write the result to aWritableLongChunk.- Specified by:
fillChunkin interfaceChunkSource<RowKeys>- Specified by:
fillChunkin interfaceRowRedirection- Parameters:
fillContext- Thefill contextmappedKeysOut- The resultWritableLongChunkkeysToMap- The row keys to lookup in this RowRedirection
-
fillPrevChunk
public void fillPrevChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> mappedKeysOut, @NotNull @NotNull RowSequence keysToMap) Description copied from interface:RowRedirectionLookup each element in aRowSequenceusing previous values and write the result to aWritableLongChunk.- Specified by:
fillPrevChunkin interfaceChunkSource.WithPrev<RowKeys>- Specified by:
fillPrevChunkin interfaceRowRedirection- Parameters:
fillContext- Thefill contextmappedKeysOut- The resultWritableLongChunkkeysToMap- The row keys to lookup in this RowRedirection
-
toString
-