Class ByteAggregateColumnSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<DB_ARRAY_TYPE>
com.illumon.iris.db.v2.sources.aggregate.ByteAggregateColumnSource
- All Implemented Interfaces:
AggregateColumnSource<DbByteArray,
,Byte> ChunkSource<Attributes.Values>
,ChunkSource.WithPrev<Attributes.Values>
,DefaultChunkSource<Attributes.Values>
,DefaultChunkSource.WithPrev<Attributes.Values>
,FillContextMaker
,GetContextMaker
,ColumnSource<DbByteArray>
,ColumnSourceGetDefaults.ForObject<DbByteArray>
,ElementSource<DbByteArray>
,MutableColumnSource<DbByteArray>
,MutableColumnSourceGetDefaults.ForObject<DbByteArray>
,Releasable
,UngroupableColumnSource
,TupleExporter<DbByteArray>
,TupleSource<DbByteArray>
,Serializable
ColumnSource
implementation for aggregation result byte columns.- See Also:
-
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.aggregate.AggregateColumnSource
AggregateColumnSource.AggregateColumnSourceConstructor, AggregateColumnSource.FactoryHelper
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>
-
Field Summary
Fields inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
componentType, type
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fillChunk
(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys) Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys
.void
fillPrevChunk
(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys) Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys
.get
(long index) Get the value from the source.getPrev
(long index) Get the previous value at the index.final Object
getUngrouped
(long groupIndexKey, int offsetInGroup) Reach into a grouped column source and pull one element out of the array.final Boolean
getUngroupedBoolean
(long groupIndexKey, int offsetInGroup) final byte
getUngroupedByte
(long groupIndexKey, int offsetInGroup) final char
getUngroupedChar
(long groupIndexKey, int offsetInGroup) final double
getUngroupedDouble
(long groupIndexKey, int offsetInGroup) final float
getUngroupedFloat
(long groupIndexKey, int offsetInGroup) final int
getUngroupedInt
(long groupIndexKey, int offsetInGroup) final long
getUngroupedLong
(long groupIndexKey, int offsetInGroup) final Object
getUngroupedPrev
(long groupIndexKey, int offsetInGroup) final Boolean
getUngroupedPrevBoolean
(long groupIndexKey, int offsetInGroup) final byte
getUngroupedPrevByte
(long groupIndexKey, int offsetInGroup) final char
getUngroupedPrevChar
(long groupIndexKey, int offsetInGroup) final double
getUngroupedPrevDouble
(long groupIndexKey, int offsetInGroup) final float
getUngroupedPrevFloat
(long groupIndexKey, int offsetInGroup) final int
getUngroupedPrevInt
(long groupIndexKey, int offsetInGroup) final long
getUngroupedPrevLong
(long groupIndexKey, int offsetInGroup) final short
getUngroupedPrevShort
(long groupIndexKey, int offsetInGroup) final long
getUngroupedPrevSize
(long groupIndexKey) final short
getUngroupedShort
(long groupIndexKey, int offsetInGroup) final long
getUngroupedSize
(long groupIndexKey) boolean
Determine if this column source is immutable, meaning that the values at a given index key never change.final boolean
Does this particular instance of the column source support ungrouping?final ChunkSource.FillContext
makeFillContext
(int chunkCapacity, SharedContext sharedContext) Allocate a newChunkSource.FillContext
for filling chunks from thisFillContextMaker
, typically aChunkSource
.final void
ColumnSource implementations that track previous values have the option to not actually start tracking previous values until this method is called.final UngroupedColumnSource<Byte>
Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
allowsReinterpret, canUseGrouping, defaultFillChunk, doReinterpret, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getType, hasGrouping, hasGrouping, isSerializable, match, matchWithGrouping, 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
getChunkType
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, hasGrouping, match, reinterpret, releaseCachedResources, setGroupingProvider
Methods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.ForObject
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShort
Methods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, 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.ForObject
getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, 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
-
Method Details
-
get
Description copied from interface:ElementSource
Get the value from the source. This may return boxed values for basic types.- Parameters:
index
- the location in index space to get the value from.- Returns:
- the value at the index, potentially null.
-
getPrev
Description copied from interface:ElementSource
Get the previous value at the index. Previous values are used during anLTM
update
cycle to process changes in data. Duringnormal
operation previous values will be identical tocurrent
values.- Parameters:
index
- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
fillChunk
public void fillChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys) Description copied from interface:ChunkSource
Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys
.- Specified by:
fillChunk
in interfaceChunkSource<Attributes.Values>
- Overrides:
fillChunk
in classAbstractColumnSource<DbByteArray>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk.destination
- The chunk to be populated according toorderedKeys
. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,orderedKeys.size()).orderedKeys
- AnOrderedKeys
representing the keys to be fetched
-
fillPrevChunk
public void fillPrevChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys) Description copied from interface:ChunkSource.WithPrev
Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys
.- Specified by:
fillPrevChunk
in interfaceChunkSource.WithPrev<Attributes.Values>
- Overrides:
fillPrevChunk
in classAbstractColumnSource<DbByteArray>
- Parameters:
context
- A context containing all mutable/state related data used in retrieving the Chunk.destination
- The chunk to be populated according toorderedKeys
. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,orderedKeys.size()).orderedKeys
- AnOrderedKeys
representing the keys to be fetched
-
ungrouped
- Specified by:
ungrouped
in interfaceAggregateColumnSource<DB_ARRAY_TYPE extends DbArrayBase,
COMPONENT_TYPE>
-
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<DB_ARRAY_TYPE extends DbArrayBase>
-
isUngroupable
public final boolean isUngroupable()Description copied from interface:UngroupableColumnSource
Does this particular instance of the column source support ungrouping?- Specified by:
isUngroupable
in interfaceUngroupableColumnSource
- Returns:
- true if you can call the getUngrouped family of methods and get a valid answer.
-
getUngroupedSize
public final long getUngroupedSize(long groupIndexKey) - Specified by:
getUngroupedSize
in interfaceUngroupableColumnSource
- Parameters:
groupIndexKey
- the index within this column to interrogate- Returns:
- the size of the DbArray at columnIndex.
-
getUngroupedPrevSize
public final long getUngroupedPrevSize(long groupIndexKey) - Specified by:
getUngroupedPrevSize
in interfaceUngroupableColumnSource
-
getUngrouped
Description copied from interface:UngroupableColumnSource
Reach into a grouped column source and pull one element out of the array.- Specified by:
getUngrouped
in interfaceUngroupableColumnSource
- Parameters:
groupIndexKey
- the index within the column of the cell to getoffsetInGroup
- the index within the array at the specified cell- Returns:
- Equivalent to ((DbArray)columnSource.get(columnIndex)).get(arrayIndex)
-
getUngroupedPrev
- Specified by:
getUngroupedPrev
in interfaceUngroupableColumnSource
-
getUngroupedBoolean
- Specified by:
getUngroupedBoolean
in interfaceUngroupableColumnSource
-
getUngroupedPrevBoolean
- Specified by:
getUngroupedPrevBoolean
in interfaceUngroupableColumnSource
-
getUngroupedDouble
public final double getUngroupedDouble(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedDouble
in interfaceUngroupableColumnSource
-
getUngroupedPrevDouble
public final double getUngroupedPrevDouble(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevDouble
in interfaceUngroupableColumnSource
-
getUngroupedFloat
public final float getUngroupedFloat(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedFloat
in interfaceUngroupableColumnSource
-
getUngroupedPrevFloat
public final float getUngroupedPrevFloat(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevFloat
in interfaceUngroupableColumnSource
-
getUngroupedByte
public final byte getUngroupedByte(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedByte
in interfaceUngroupableColumnSource
-
getUngroupedPrevByte
public final byte getUngroupedPrevByte(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevByte
in interfaceUngroupableColumnSource
-
getUngroupedChar
public final char getUngroupedChar(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedChar
in interfaceUngroupableColumnSource
-
getUngroupedPrevChar
public final char getUngroupedPrevChar(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevChar
in interfaceUngroupableColumnSource
-
getUngroupedShort
public final short getUngroupedShort(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedShort
in interfaceUngroupableColumnSource
-
getUngroupedPrevShort
public final short getUngroupedPrevShort(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevShort
in interfaceUngroupableColumnSource
-
getUngroupedInt
public final int getUngroupedInt(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedInt
in interfaceUngroupableColumnSource
-
getUngroupedPrevInt
public final int getUngroupedPrevInt(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevInt
in interfaceUngroupableColumnSource
-
getUngroupedLong
public final long getUngroupedLong(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedLong
in interfaceUngroupableColumnSource
-
getUngroupedPrevLong
public final long getUngroupedPrevLong(long groupIndexKey, int offsetInGroup) - Specified by:
getUngroupedPrevLong
in interfaceUngroupableColumnSource
-
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<DB_ARRAY_TYPE extends DbArrayBase>
- Specified by:
isImmutable
in interfaceMutableColumnSource<DB_ARRAY_TYPE extends DbArrayBase>
- Returns:
- true if the values at a given index of the column source never change, false otherwise
-