Class ImmutableDateTimeTestSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<DBDateTime>
io.deephaven.engine.testutil.v2.sources.ImmutableDateTimeTestSource
- All Implemented Interfaces:
ChunkSource<Attributes.Values>,ChunkSource.WithPrev<Attributes.Values>,DefaultChunkSource<Attributes.Values>,DefaultChunkSource.WithPrev<Attributes.Values>,FillContextMaker,GetContextMaker,ColumnSource<DBDateTime>,ColumnSourceGetDefaults.ForObject<DBDateTime>,ElementSource<DBDateTime>,MutableColumnSource<DBDateTime>,MutableColumnSourceGetDefaults.ForObject<DBDateTime>,Releasable,TupleExporter<DBDateTime>,TupleSource<DBDateTime>,TestColumnSource<DBDateTime>,Serializable
public class ImmutableDateTimeTestSource
extends AbstractColumnSource<DBDateTime>
implements MutableColumnSourceGetDefaults.ForObject<DBDateTime>, TestColumnSource<DBDateTime>
DateTime column source that wraps and delegates the storage to an
ImmutableLongTestSource<Long>.
This also provides an interface so this column can be interpreted as a long column (through UnboxedDateTimeTestSource).- 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.IsSerializableNested 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, typeFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new ImmutableDateTimeTestSource with no initial data.ImmutableDateTimeTestSource(ReadOnlyIndex index, Chunk<Attributes.Values> data) Create a new DateTimeTreeMapSource with the given index and data. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ReadOnlyIndex index, Chunk<Attributes.Values> data) Add the chunk of data, parallel to index to this column source.<ALTERNATE_DATA_TYPE>
booleanallowsReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Test if a reinterpret call will succeed.<ALTERNATE_DATA_TYPE>
ColumnSource<ALTERNATE_DATA_TYPE>doReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Supply allowed reinterpret results.get(long index) Get the value from the source.longgetLong(long index) Get the value at the index as a long.getPrev(long index) Get the previous value at the index.longgetPrevLong(long index) Get the previous value at the index as a long.booleanDetermine if this column source is immutable, meaning that the values at a given index key never change.voidremove(ReadOnlyIndex index) Remove the given index from the column source.voidshift(long startKeyInclusive, long endKeyInclusive, long shiftDelta) Move data within the column source.Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
canUseGrouping, defaultFillChunk, fillChunk, fillPrevChunk, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getType, hasGrouping, hasGrouping, isSerializable, match, matchWithGrouping, reinterpret, setGroupingProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
fillChunk, getChunkTypeMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
fillPrevChunkMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getPrevSource, getType, hasGrouping, hasGrouping, match, reinterpret, releaseCachedResources, setGroupingProvider, startTrackingPrevValuesMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.ForObject
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFillingMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.MutableColumnSourceGetDefaults.ForObject
getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevShortMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleExporter
exportElementReinterpretedMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleSource
createTupleFromReinterpretedValues
-
Constructor Details
-
ImmutableDateTimeTestSource
public ImmutableDateTimeTestSource()Create a new ImmutableDateTimeTestSource with no initial data. -
ImmutableDateTimeTestSource
Create a new DateTimeTreeMapSource with the given index and data.- Parameters:
index- The row indexes for the initial datadata- The initial data
-
-
Method Details
-
add
Description copied from interface:TestColumnSourceAdd the chunk of data, parallel to index to this column source.For TestColumnSources with primitive types, the chunk of data must either be of the appropriate primitive type or an
ObjectChunkcontaining boxed values.- Specified by:
addin interfaceTestColumnSource<DBDateTime>- Parameters:
index- the index locations to add the datadata- the data to add
-
remove
Description copied from interface:TestColumnSourceRemove the given index from the column source.- Specified by:
removein interfaceTestColumnSource<DBDateTime>- Parameters:
index- the keys to remove
-
shift
public void shift(long startKeyInclusive, long endKeyInclusive, long shiftDelta) Description copied from interface:TestColumnSourceMove data within the column source.- Specified by:
shiftin interfaceTestColumnSource<DBDateTime>- Parameters:
startKeyInclusive- the first key to shiftendKeyInclusive- the last key to shiftshiftDelta- how far to shift the data (either positive or negative)
-
get
Description copied from interface:ElementSourceGet the value from the source. This may return boxed values for basic types.- Specified by:
getin interfaceElementSource<DBDateTime>- Parameters:
index- the location in index space to get the value from.- Returns:
- the value at the index, potentially null.
-
isImmutable
public boolean isImmutable()Description copied from interface:ColumnSourceDetermine if this column source is immutable, meaning that the values at a given index key never change.- Specified by:
isImmutablein interfaceColumnSource<DBDateTime>- Specified by:
isImmutablein interfaceMutableColumnSource<DBDateTime>- Returns:
- true if the values at a given index of the column source never change, false otherwise
-
getLong
public long getLong(long index) Description copied from interface:ElementSourceGet the value at the index as a long.- Specified by:
getLongin interfaceColumnSourceGetDefaults.ForObject<DBDateTime>- Specified by:
getLongin interfaceElementSource<DBDateTime>- 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
-
getPrev
Description copied from interface:ElementSourceGet the previous value at the index. Previous values are used during anLTMupdatecycle to process changes in data. Duringnormaloperation previous values will be identical tocurrentvalues.- Specified by:
getPrevin interfaceElementSource<DBDateTime>- Parameters:
index- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
getPrevLong
public long getPrevLong(long index) Description copied from interface:ElementSourceGet the previous value at the index as a long. SeeElementSource.getPrev(long)for more details.- Specified by:
getPrevLongin interfaceElementSource<DBDateTime>- Specified by:
getPrevLongin interfaceMutableColumnSourceGetDefaults.ForObject<DBDateTime>- 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
-
allowsReinterpret
public <ALTERNATE_DATA_TYPE> boolean allowsReinterpret(@NotNull @NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Description copied from interface:ColumnSourceTest if a reinterpret call will succeed.- Specified by:
allowsReinterpretin interfaceColumnSource<DBDateTime>- Overrides:
allowsReinterpretin classAbstractColumnSource<DBDateTime>- Type Parameters:
ALTERNATE_DATA_TYPE- the dataType to inquire about- Parameters:
alternateDataType- The alternative type to consider- Returns:
- If a reinterpret on this column source with the supplied alternateDataType will succeed.
-
doReinterpret
public <ALTERNATE_DATA_TYPE> ColumnSource<ALTERNATE_DATA_TYPE> doReinterpret(@NotNull @NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) throws IllegalArgumentException Description copied from class:AbstractColumnSourceSupply allowed reinterpret results. The default implementation handles the most common case to avoid code duplication.- Overrides:
doReinterpretin classAbstractColumnSource<DBDateTime>- Type Parameters:
ALTERNATE_DATA_TYPE- the dataType to reinterpret to- Parameters:
alternateDataType- The alternate data type- Returns:
- The resulting
ColumnSource - Throws:
IllegalArgumentException
-