Package com.illumon.iris.db.v2.sources
Class LongSingleValueSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<T>
com.illumon.iris.db.v2.sources.SingleValueColumnSource<Long>
com.illumon.iris.db.v2.sources.LongSingleValueSource
- All Implemented Interfaces:
ChunkSource<Attributes.Values>
,ChunkSource.WithPrev<Attributes.Values>
,DefaultChunkSource<Attributes.Values>
,DefaultChunkSource.WithPrev<Attributes.Values>
,FillContextMaker
,GetContextMaker
,ColumnSource<Long>
,ColumnSourceGetDefaults.ForLong
,ColumnSourceGetDefaults.LongBacked<Long>
,ElementSource<Long>
,MutableColumnSource<Long>
,MutableColumnSourceGetDefaults.ForLong
,MutableColumnSourceGetDefaults.LongBacked<Long>
,Releasable
,WritableChunkSink<Attributes.Values>
,WritableSource<Long>
,TupleExporter<Long>
,TupleSource<Long>
,ShiftData.ShiftCallback
,Serializable
public class LongSingleValueSource extends SingleValueColumnSource<Long> implements MutableColumnSourceGetDefaults.ForLong
Single value source for Long.
The C-haracterSingleValueSource is replicated to all other types with com.illumon.iris.db.v2.sources.Replicate. (C-haracter is deliberately spelled that way in order to prevent Replicate from altering this very comment).
- 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 inherited from class com.illumon.iris.db.v2.sources.SingleValueColumnSource
changeTime, 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
-
Constructor Summary
Constructors Constructor Description LongSingleValueSource()
-
Method Summary
Modifier and Type Method Description void
copy(ColumnSource<Long> sourceColumn, long sourceKey, long destKey)
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.long
getLong(long index)
Get the value at the index as a long.long
getPrevLong(long index)
Get the previous value at the index as a long.void
set(long value)
void
set(long key, long value)
void
set(Long value)
void
setNull(long key)
void
setNull(OrderedKeys keys)
Methods inherited from class com.illumon.iris.db.v2.sources.SingleValueColumnSource
ensureCapacity, getSingleValueColumnSource, isImmutable, makeFillFromContext, set, set, set, set, set, set, shift, startTrackingPrevValues
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, startTrackingPrevValues
Methods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.LongBacked
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getShort
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.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.sources.MutableColumnSourceGetDefaults.ForLong
getPrev
Methods inherited from interface com.illumon.iris.db.v2.sources.MutableColumnSourceGetDefaults.LongBacked
getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevShort
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
-
LongSingleValueSource
public LongSingleValueSource()
-
-
Method Details
-
set
- Overrides:
set
in classSingleValueColumnSource<Long>
-
set
public final void set(long value)- Overrides:
set
in classSingleValueColumnSource<Long>
-
set
public final void set(long key, long value)- Specified by:
set
in interfaceWritableSource<Long>
-
setNull
public final void setNull(long key)- Specified by:
setNull
in interfaceWritableSource<Long>
-
setNull
- Specified by:
setNull
in interfaceWritableSource<Long>
-
getLong
public final long getLong(long index)Description copied from interface:ElementSource
Get the value at the index as a long.- Specified by:
getLong
in interfaceElementSource<Long>
- Parameters:
index
- the location in index space to get the value from.- Returns:
- the long at the index, null values are represented by
QueryConstants.NULL_LONG
-
getPrevLong
public final long getPrevLong(long index)Description copied from interface:ElementSource
Get the previous value at the index as a long. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevLong
in interfaceElementSource<Long>
- Parameters:
index
- the location in index space to get the previous value from.- Returns:
- the previous long at the index, null values are represented by
QueryConstants.NULL_LONG
-
copy
- Specified by:
copy
in interfaceWritableSource<Long>
-
fillFromChunk
public final 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<Attributes.Values>
- Specified by:
fillFromChunk
in interfaceWritableSource<Long>
- 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<Attributes.Values>
- Specified by:
fillFromChunkUnordered
in interfaceWritableSource<Long>
- 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
-