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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this class supports time conversion.Convert this source to aDBDateTimesource.Convert this source to alongsource of nanoseconds of epoch.Convert this source to anInstantsource.toLocalDate(ZoneId zone) toLocalTime(ZoneId zone) 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.
-