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
ColumnSource
s 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 interface
ConvertableTimeSource.Zoned
-
Method Summary
Modifier and Type Method Description boolean
supportsTimeConversion()
Check if this class supports time conversion.ColumnSource<DBDateTime>
toDBDateTime()
Convert this source to aDBDateTime
source.ColumnSource<Long>
toEpochNano()
Convert this source to along
source of nanoseconds of epoch.ColumnSource<Instant>
toInstant()
Convert this source to anInstant
source.ColumnSource<LocalDate>
toLocalDate(ZoneId zone)
ColumnSource<LocalTime>
toLocalTime(ZoneId zone)
ColumnSource<ZonedDateTime>
toZonedDateTime(ZoneId zone)
Convert this source to aZonedDateTime
source at the specifiedzone
.
-
Method Details
-
toZonedDateTime
Convert this source to aZonedDateTime
source 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 anInstant
source.- Returns:
- a view of this source as a
Instant
-
toDBDateTime
ColumnSource<DBDateTime> toDBDateTime()Convert this source to aDBDateTime
source.- Returns:
- a view of this source as a
DBDateTime
-
toEpochNano
ColumnSource<Long> toEpochNano()Convert this source to along
source 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.
-