Package com.illumon.iris.db.v2.sources
Class LocalDateWrapperSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<LocalDate>
com.illumon.iris.db.v2.sources.LocalDateWrapperSource
- All Implemented Interfaces:
ChunkSource<Attributes.Values>,ChunkSource.WithPrev<Attributes.Values>,DefaultChunkSource<Attributes.Values>,DefaultChunkSource.WithPrev<Attributes.Values>,FillContextMaker,GetContextMaker,ColumnSource<LocalDate>,ColumnSourceGetDefaults.ForObject<LocalDate>,ElementSource<LocalDate>,MutableColumnSource<LocalDate>,MutableColumnSourceGetDefaults.ForObject<LocalDate>,Releasable,TupleExporter<LocalDate>,TupleSource<LocalDate>,Serializable
public class LocalDateWrapperSource
extends AbstractColumnSource<LocalDate>
implements MutableColumnSourceGetDefaults.ForObject<LocalDate>
A
ColumnSource for LocalDates that is backed by an inner ColumnSource of ZonedDateTime.
Note that no special handling is done for timezones. The returned local time will be in the zone of each inner ZonedDateTime.- 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
Constructors -
Method Summary
Modifier and TypeMethodDescription<ALTERNATE_DATA_TYPE>
booleanallowsReinterpret(Class<ALTERNATE_DATA_TYPE> alternateDataType) Test if a reinterpret call will succeed.protected <ALTERNATE_DATA_TYPE>
ColumnSource<ALTERNATE_DATA_TYPE>doReinterpret(Class<ALTERNATE_DATA_TYPE> alternateDataType) Supply allowed reinterpret results.voidfillChunk(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> dest, OrderedKeys orderedKeys) Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.voidfillPrevChunk(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> dest, 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.makeFillContext(int chunkCapacity, SharedContext sharedContext) Allocate a newChunkSource.FillContextfor filling chunks from thisFillContextMaker, typically aChunkSource.Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
canUseGrouping, defaultFillChunk, 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
getChunkTypeMethods 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, getLong, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, 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.MutableColumnSource
isImmutableMethods inherited from interface com.illumon.iris.db.v2.sources.MutableColumnSourceGetDefaults.ForObject
getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, 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
-
LocalDateWrapperSource
-
-
Method Details
-
allowsReinterpret
public <ALTERNATE_DATA_TYPE> boolean allowsReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Description copied from interface:ColumnSourceTest if a reinterpret call will succeed.- Specified by:
allowsReinterpretin interfaceColumnSource<LocalDate>- Overrides:
allowsReinterpretin classAbstractColumnSource<LocalDate>- 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
protected <ALTERNATE_DATA_TYPE> ColumnSource<ALTERNATE_DATA_TYPE> doReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) Description copied from class:AbstractColumnSourceSupply allowed reinterpret results. The default implementation handles the most common case to avoid code duplication.- Overrides:
doReinterpretin classAbstractColumnSource<LocalDate>- Type Parameters:
ALTERNATE_DATA_TYPE- the dataType to reinterpret to- Parameters:
alternateDataType- The alternate data type- Returns:
- The resulting
ColumnSource
-
get
Description copied from interface:ElementSourceGet the value from the source. This may return boxed values for basic types.- Specified by:
getin interfaceElementSource<LocalDate>- 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: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<LocalDate>- 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> dest, @NotNull OrderedKeys orderedKeys) Description copied from interface:ChunkSourcePopulates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.- Specified by:
fillChunkin interfaceChunkSource<Attributes.Values>- Overrides:
fillChunkin classAbstractColumnSource<LocalDate>- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk.dest- 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- AnOrderedKeysrepresenting the keys to be fetched
-
fillPrevChunk
public void fillPrevChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> dest, @NotNull OrderedKeys orderedKeys) Description copied from interface:ChunkSource.WithPrevPopulates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.- Specified by:
fillPrevChunkin interfaceChunkSource.WithPrev<Attributes.Values>- Overrides:
fillPrevChunkin classAbstractColumnSource<LocalDate>- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk.dest- 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- AnOrderedKeysrepresenting the keys to be fetched
-