Package com.illumon.iris.db.v2.sources
Class RedirectedColumnSource<T>
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<T>
com.illumon.iris.db.v2.sources.ReadOnlyRedirectedColumnSource<T>
com.illumon.iris.db.v2.sources.RedirectedColumnSource<T>
- All Implemented Interfaces:
ChunkSource<Attributes.Values>
,ChunkSource.WithPrev<Attributes.Values>
,DefaultChunkSource<Attributes.Values>
,DefaultChunkSource.WithPrev<Attributes.Values>
,FillContextMaker
,GetContextMaker
,ColumnSource<T>
,ConvertableTimeSource
,ElementSource<T>
,Releasable
,UngroupableColumnSource
,WritableChunkSink<Attributes.Values>
,WritableSource<T>
,TupleExporter<T>
,TupleSource<T>
,Serializable
public class RedirectedColumnSource<T> extends ReadOnlyRedirectedColumnSource<T> implements WritableSource<T>
A
ColumnSource
that provides a redirected view into another ColumnSource
by mapping keys using a
RedirectionIndex
.- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
AbstractColumnSource.DefaultedImmutable<DATA_TYPE>, AbstractColumnSource.DefaultedMutable<DATA_TYPE>, AbstractColumnSource.IsSerializable
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.ConvertableTimeSource
ConvertableTimeSource.Zoned
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any>
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.WritableChunkSink
WritableChunkSink.FillFromContext
-
Field Summary
Fields inherited from class com.illumon.iris.db.v2.sources.ReadOnlyRedirectedColumnSource
innerSource, redirectionIndex
Fields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAY
Fields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAY
Fields inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY
Fields inherited from interface com.illumon.iris.db.v2.sources.WritableChunkSink
DEFAULT_FILL_FROM_INSTANCE
Fields inherited from interface com.illumon.iris.db.v2.sources.WritableSource
ZERO_LENGTH_WRITABLE_SOURCE_ARRAY
-
Constructor Summary
Constructors Constructor Description RedirectedColumnSource(RedirectionIndex redirectionIndex, ColumnSource<T> innerSource, long maxInnerIndex)
Create a type-appropriate RedirectedColumnSource for the suppliedRedirectionIndex
and innerColumnSource
. -
Method Summary
Modifier and Type Method Description void
copy(ColumnSource<T> sourceColumn, long sourceKey, long destKey)
void
ensureCapacity(long capacity)
void
fillFromChunk(WritableChunkSink.FillFromContext context, Chunk<? extends Attributes.Values> src, OrderedKeys orderedKeys)
Our default, inefficient, implementation.void
fillFromChunkUnordered(WritableChunkSink.FillFromContext context, Chunk<? extends Attributes.Values> src, LongChunk<Attributes.KeyIndices> keys)
Fills the ChunkSink with data from the source, with data corresponding to the keys from the given key chunk.WritableChunkSink.FillFromContext
makeFillFromContext(int chunkCapacity)
Provide a default, emptyWritableChunkSink.FillFromContext
for use with our defaultWritableSource.fillFromChunk(com.illumon.iris.db.v2.sources.WritableChunkSink.FillFromContext, com.illumon.iris.db.v2.sources.chunk.Chunk<? extends com.illumon.iris.db.v2.sources.chunk.Attributes.Values>, com.illumon.iris.db.v2.utils.OrderedKeys)
.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
set(long key, T value)
void
setNull(long key)
Methods inherited from class com.illumon.iris.db.v2.sources.ReadOnlyRedirectedColumnSource
allowsReinterpret, doReinterpret, fillChunk, fillPrevChunk, get, getBoolean, getByte, getChar, getComponentType, getDouble, getFloat, getInt, getLong, getPrev, getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShort, getRedirectionIndex, getShort, getUngrouped, getUngroupedBoolean, getUngroupedByte, getUngroupedChar, getUngroupedDouble, getUngroupedFloat, getUngroupedInt, getUngroupedLong, getUngroupedPrev, getUngroupedPrevBoolean, getUngroupedPrevByte, getUngroupedPrevChar, getUngroupedPrevDouble, getUngroupedPrevFloat, getUngroupedPrevInt, getUngroupedPrevLong, getUngroupedPrevShort, getUngroupedPrevSize, getUngroupedShort, getUngroupedSize, isImmutable, isUngroupable, makeFillContext, releaseCachedResources, startTrackingPrevValues, supportsTimeConversion, toDBDateTime, toEpochNano, toInstant, toLocalDate, toLocalTime, toZonedDateTime
Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
defaultFillChunk, getGroupingBuilder, getGroupingProvider, getNativeType, getType, hasGrouping, isSerializable, match, reinterpret, setGroupingProvider
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
fillChunk, getChunkType
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
fillPrevChunk
Methods inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
allowsReinterpret, cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getPrevSource, getType, hasGrouping, isImmutable, match, reinterpret, releaseCachedResources, setGroupingProvider, startTrackingPrevValues
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFilling
Methods inherited from interface com.illumon.iris.db.v2.sources.ElementSource
get, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getPrev, getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShort, getShort
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContext
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContext
Methods inherited from interface com.illumon.iris.db.v2.tuples.TupleExporter
exportElementReinterpreted
Methods inherited from interface com.illumon.iris.db.v2.tuples.TupleSource
createTupleFromReinterpretedValues
-
Constructor Details
-
RedirectedColumnSource
public RedirectedColumnSource(@NotNull RedirectionIndex redirectionIndex, @NotNull ColumnSource<T> innerSource, long maxInnerIndex)Create a type-appropriate RedirectedColumnSource for the suppliedRedirectionIndex
and innerColumnSource
.- Parameters:
redirectionIndex
- The redirection index to useinnerSource
- The column source to redirectmaxInnerIndex
- The maximum index key available in innerSource
-
-
Method Details
-
set
- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, byte value)- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, char value)- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, double value)- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, float value)- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, int value)- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, long value)- Specified by:
set
in interfaceWritableSource<T>
-
set
public void set(long key, short value)- Specified by:
set
in interfaceWritableSource<T>
-
setNull
public void setNull(long key)- Specified by:
setNull
in interfaceWritableSource<T>
-
copy
- Specified by:
copy
in interfaceWritableSource<T>
-
ensureCapacity
public void ensureCapacity(long capacity)- Specified by:
ensureCapacity
in interfaceWritableSource<T>
-
makeFillFromContext
Description copied from interface:WritableSource
Provide a default, emptyWritableChunkSink.FillFromContext
for use with our defaultWritableSource.fillFromChunk(com.illumon.iris.db.v2.sources.WritableChunkSink.FillFromContext, com.illumon.iris.db.v2.sources.chunk.Chunk<? extends com.illumon.iris.db.v2.sources.chunk.Attributes.Values>, com.illumon.iris.db.v2.utils.OrderedKeys)
.- Specified by:
makeFillFromContext
in interfaceWritableChunkSink<T>
- Specified by:
makeFillFromContext
in interfaceWritableSource<T>
-
fillFromChunk
public void fillFromChunk(@NotNull WritableChunkSink.FillFromContext context, @NotNull Chunk<? extends Attributes.Values> src, @NotNull OrderedKeys orderedKeys)Description copied from interface:WritableSource
Our default, inefficient, implementation. Inheritors who care should provide a better implementation.- Specified by:
fillFromChunk
in interfaceWritableChunkSink<T>
- Specified by:
fillFromChunk
in interfaceWritableSource<T>
- Parameters:
context
- A context containing all mutable/state related data used in writing the Chunk.src
- The source of the dataorderedKeys
orderedKeys
- AnOrderedKeys
representing the keys to be written
-
fillFromChunkUnordered
public void fillFromChunkUnordered(@NotNull WritableChunkSink.FillFromContext context, @NotNull Chunk<? extends Attributes.Values> src, @NotNull LongChunk<Attributes.KeyIndices> keys)Description copied from interface:WritableChunkSink
Fills the ChunkSink with data from the source, with data corresponding to the keys from the given key chunk.- Specified by:
fillFromChunkUnordered
in interfaceWritableChunkSink<T>
- Specified by:
fillFromChunkUnordered
in interfaceWritableSource<T>
- Parameters:
context
- A context containing all mutable/state related data used in writing the Chunk.src
- The source of the dataorderedKeys
keys
- ALongChunk
representing the keys to be written
-