Package com.illumon.iris.db.v2.sources
Class SingleValueColumnSource<T>
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<T>
com.illumon.iris.db.v2.sources.SingleValueColumnSource<T>
- All Implemented Interfaces:
ChunkSource<Attributes.Values>
,ChunkSource.WithPrev<Attributes.Values>
,DefaultChunkSource<Attributes.Values>
,DefaultChunkSource.WithPrev<Attributes.Values>
,FillContextMaker
,GetContextMaker
,ColumnSource<T>
,ElementSource<T>
,Releasable
,WritableChunkSink<Attributes.Values>
,WritableSource<T>
,TupleExporter<T>
,TupleSource<T>
,ShiftData.ShiftCallback
,Serializable
- Direct Known Subclasses:
BooleanSingleValueSource
,ByteSingleValueSource
,CharacterSingleValueSource
,DoubleSingleValueSource
,FloatSingleValueSource
,IntegerSingleValueSource
,LongSingleValueSource
,ObjectSingleValueSource
,ShortSingleValueSource
public abstract class SingleValueColumnSource<T> extends AbstractColumnSource<T> implements WritableSource<T>, WritableChunkSink<Attributes.Values>, ShiftData.ShiftCallback, Serializable
- 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.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 Modifier and Type Field Description protected long
changeTime
protected boolean
isTrackingPrevValues
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
-
Method Summary
Modifier and Type Method Description void
ensureCapacity(long capacity)
static <T> SingleValueColumnSource
getSingleValueColumnSource(Class<T> type)
boolean
isImmutable()
Determine if this column source is immutable, meaning that the values at a given index key never change.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(byte value)
void
set(char value)
void
set(double value)
void
set(float value)
void
set(int value)
void
set(long value)
void
set(short value)
void
set(T value)
void
shift(long start, long end, long offset)
void
startTrackingPrevValues()
ColumnSource implementations that track previous values have the option to not actually start tracking previous values until this method is called.Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
allowsReinterpret, defaultFillChunk, doReinterpret, fillChunk, fillPrevChunk, getComponentType, 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, match, reinterpret, releaseCachedResources, setGroupingProvider
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
Methods inherited from interface com.illumon.iris.db.v2.sources.WritableSource
copy, fillFromChunk, fillFromChunkUnordered, set, set, set, set, set, set, set, set, setNull, setNull
-
Field Details
-
changeTime
protected transient long changeTime -
isTrackingPrevValues
protected boolean isTrackingPrevValues
-
-
Method Details
-
startTrackingPrevValues
public final void startTrackingPrevValues()Description copied from interface:ColumnSource
ColumnSource implementations that track previous values have the option to not actually start tracking previous values until this method is called. This is an option, not an obligation: some simple ColumnSource implementations (like TSingleValueSource for various T) always track previous values; other implementations (like PrevColumnSource) never do; some (like TArrayColumnSource) only start tracking once this method is called. An immutable column source can not have distinct prev values; therefore it is implemented as a no-op.- Specified by:
startTrackingPrevValues
in interfaceColumnSource<T>
-
shift
public void shift(long start, long end, long offset)- Specified by:
shift
in interfaceShiftData.ShiftCallback
-
getSingleValueColumnSource
-
isImmutable
public boolean isImmutable()Description copied from interface:ColumnSource
Determine if this column source is immutable, meaning that the values at a given index key never change.- Specified by:
isImmutable
in interfaceColumnSource<T>
- Returns:
- true if the values at a given index of the column source never change, false otherwise
-
set
public void set(char value) -
set
public void set(byte value) -
set
public void set(double value) -
set
public void set(float value) -
set
public void set(short value) -
set
public void set(long value) -
set
public void set(int value) -
set
-
ensureCapacity
public final 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>
-