Package com.illumon.iris.db.v2.sources
Interface ConvertableTimeSource
- All Known Implementing Classes:
DateTimeArraySource,DateTimeSparseArraySource,InstantArraySource,InstantSparseArraySource,LongArraySource,LongSparseArraySource,NanosBasedTimeArraySource,NanosBasedTimeSparseArraySource,ReadOnlyRedirectedColumnSource,RedirectedColumnSource,ShiftedColumnSource,ZonedDateTimeArraySource,ZonedDateTimeSparseArraySource
public interface ConvertableTimeSource
An interface for
ColumnSources that indicate that it both represents a time value, and may be converted
between other common time values efficiently.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceConvertableTimeSource.Zoned -
Method Summary
Modifier and Type Method Description booleansupportsTimeConversion()Check if this class supports time conversion.ColumnSource<DBDateTime>toDBDateTime()Convert this source to aDBDateTimesource.ColumnSource<Long>toEpochNano()Convert this source to alongsource of nanoseconds of epoch.ColumnSource<Instant>toInstant()Convert this source to anInstantsource.ColumnSource<LocalDate>toLocalDate(ZoneId zone)ColumnSource<LocalTime>toLocalTime(ZoneId zone)ColumnSource<ZonedDateTime>toZonedDateTime(ZoneId zone)Convert this source to aZonedDateTimesource at the specifiedzone.
-
Method Details
-
toZonedDateTime
Convert this source to aZonedDateTimesource at the specifiedzone.- Parameters:
zone- the time zone- Returns:
- a view of this source as a
ZonedDateTime
-
toLocalDate
- Parameters:
zone- the time zone- Returns:
- a view of this source as a
LocalDate
-
toLocalTime
- Parameters:
zone- the time zone- Returns:
- a view of this source as a
LocalTime
-
toInstant
ColumnSource<Instant> toInstant()Convert this source to anInstantsource.- Returns:
- a view of this source as a
Instant
-
toDBDateTime
ColumnSource<DBDateTime> toDBDateTime()Convert this source to aDBDateTimesource.- Returns:
- a view of this source as a
DBDateTime
-
toEpochNano
ColumnSource<Long> toEpochNano()Convert this source to alongsource of nanoseconds of epoch.- Returns:
- a view of this source as a
ZonedDateTime
-
supportsTimeConversion
boolean supportsTimeConversion()Check if this class supports time conversion. If false, all other methods will fail.- Returns:
- true if time conversion is supported.
-