Class ObjectSsmBackedSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<DbArray>
com.illumon.iris.db.v2.by.ssmcountdistinct.ObjectSsmBackedSource
- All Implemented Interfaces:
SsmBackedColumnSource<ObjectSegmentedSortedMultiset,
,DbArray> ChunkSource<Attributes.Values>
,ChunkSource.WithPrev<Attributes.Values>
,DefaultChunkSource<Attributes.Values>
,DefaultChunkSource.WithPrev<Attributes.Values>
,FillContextMaker
,GetContextMaker
,ColumnSource<DbArray>
,ColumnSourceGetDefaults.ForObject<DbArray>
,ElementSource<DbArray>
,MutableColumnSource<DbArray>
,MutableColumnSourceGetDefaults.ForObject<DbArray>
,Releasable
,TupleExporter<DbArray>
,TupleSource<DbArray>
,Serializable
public class ObjectSsmBackedSource
extends AbstractColumnSource<DbArray>
implements ColumnSourceGetDefaults.ForObject<DbArray>, MutableColumnSourceGetDefaults.ForObject<DbArray>, SsmBackedColumnSource<ObjectSegmentedSortedMultiset,DbArray>
A
SsmBackedColumnSource
for Objects.- 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.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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(long key) Set the SSM at the specified key to nullvoid
clearDeltas
(Index indices) Clear out any tracked deltas from recent computations.void
ensureCapacity
(long capacity) Ensure the source has at least `capacity` capacityget
(long index) Get the value from the source.getCurrentSsm
(long key) Get the current SSM at the specified key.getOrCreate
(long key) Get the ssm at the specified key, creating one if none existed.getPrev
(long index) Get the previous value at the index.boolean
Determine if this column source is immutable, meaning that the values at a given index key never change.void
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, canUseGrouping, defaultFillChunk, doReinterpret, fillChunk, fillPrevChunk, 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
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, 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, 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.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
-
Constructor Details
-
ObjectSsmBackedSource
-
-
Method Details
-
getOrCreate
Description copied from interface:SsmBackedColumnSource
Get the ssm at the specified key, creating one if none existed. This method will update the current previous tracking state of the SSM.- Specified by:
getOrCreate
in interfaceSsmBackedColumnSource<ObjectSegmentedSortedMultiset,
DbArray> - Parameters:
key
- the key to get the ssm for.- Returns:
- the SSM at the key, or a new one.
-
getCurrentSsm
Description copied from interface:SsmBackedColumnSource
Get the current SSM at the specified key. This does not permute it in any way.- Specified by:
getCurrentSsm
in interfaceSsmBackedColumnSource<ObjectSegmentedSortedMultiset,
DbArray> - Parameters:
key
- the key to get the ssm for.- Returns:
- the SSM
-
clear
public void clear(long key) Description copied from interface:SsmBackedColumnSource
Set the SSM at the specified key to null- Specified by:
clear
in interfaceSsmBackedColumnSource<ObjectSegmentedSortedMultiset,
DbArray> - Parameters:
key
- the key to get the ssm for.
-
ensureCapacity
public void ensureCapacity(long capacity) Description copied from interface:SsmBackedColumnSource
Ensure the source has at least `capacity` capacity- Specified by:
ensureCapacity
in interfaceSsmBackedColumnSource<ObjectSegmentedSortedMultiset,
DbArray> - Parameters:
capacity
- the capacity to ensure.
-
getUnderlyingSource
- Specified by:
getUnderlyingSource
in interfaceSsmBackedColumnSource<ObjectSegmentedSortedMultiset,
DbArray>
-
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<DbArray>
- Specified by:
isImmutable
in interfaceMutableColumnSource<DbArray>
- Returns:
- true if the values at a given index of the column source never change, false otherwise
-
get
Description copied from interface:ElementSource
Get the value from the source. This may return boxed values for basic types.- Specified by:
get
in interfaceElementSource<DbArray>
- 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.- Specified by:
getPrev
in interfaceElementSource<DbArray>
- Parameters:
index
- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
startTrackingPrevValues
public 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<DbArray>
-
clearDeltas
Description copied from interface:SsmBackedColumnSource
Clear out any tracked deltas from recent computations.- Specified by:
clearDeltas
in interfaceSsmBackedColumnSource<ObjectSegmentedSortedMultiset,
DbArray> - Parameters:
indices
- the set of indices to clear deltas for.
-