Interface MillisecondStoreDataProvider
- All Known Implementing Classes:
ExternalResourceMillisecondStoreDataProvider
,FileMillisecondStoreDataProvider
,HttpMillisecondStoreDataProvider
,StandardEarthHttpMillisecondStoreDataProvider
,StandardEarthMillisecondStoreDataProvider
Day
and Year
, an instance of this class provices the number of milliseconds between the start of the calendar
(the Lukashian epoch) and the end of that day or year (we call this 'epoch milliseconds'). It also stores the offset between the Lukashian
epoch and the UNIX epoch. Using these numbers, the actual years and days of the Lukashian Calendar are defined. An implementation of
MillisecondStoreDataProvider
has to provide the following data:
- The number of epoch milliseconds for each year in an array where the index + 1 is the year and the value is the number of epoch milliseconds for that year, i.e. how many milliseconds have passed from the beginning of the calendar up until the final point of that year.
- The number of epoch milliseconds for each day in an array where the index + 1 is the epoch day and the value is the number of epoch milliseconds for that day, i.e. how many milliseconds have passed from the beginning of the calendar up until the final point of that day. This does not take into account the year that each day is in, it simply lists all days in the calendar (epoch days).
- The offset in milliseconds between the Lukashian epoch (i.e. the start of the Lukashian Calendar) and the UNIX epoch in such a way that "unixEpochOffsetMilliseconds + millisecondsSinceUnixEpoch = millisecondsSinceLukashianEpoch", in other words, when the UNIX epoch is AFTER the Lukashian epoch, it needs to be a positive number. It needs to be measured around the point of the UNIX epoch, before any UNIX leap seconds were added.
StandardEarthMillisecondStoreDataProvider
, stores data that makes the Lukashian
Calendar:
- For Solar Earth Years that run from Southern Solstice to Southern Solstice
- For True Solar Earth Days
- With the year number approximately 3900 higher than the Gregorian Calendar
- All measured according to Terrestrial Time
MillisecondStoreDataProvider
that loads the data for Astronomical Mars years,
Astronomical Mars days, starting 10000 Mars years in the past and measured according to Barycentric Coordinate Time. Please refer to
MillisecondStore
for information on how to specify which instance of MillisecondStoreDataProvider
to use.
This implementation of The Lukashian Calendar Mechanism assumes that each year and each day is at least 3 milliseconds long, i.e. there's a first millisecond, a last one and at least one in between. It might work for years and days that last less than 3 milliseconds, but this has not been tested and is not guaranteed.
Following the previous constraint, this implementation of The Lukashian Calendar Mechanism also assumes that each year is at least 3 days long, i.e. there's a first day, a last one and at least one in between.
Implementations of this interface do not have to provide any caching functionality: each method is called only once and the result is
stored for future reference by the MillisecondStore
. This happens when the singleton instance of the MillisecondStore
is
initialized, which happens during most interactions with any of the calendar classes.
-
Method Summary
Modifier and TypeMethodDescriptionlong[]
loadDayEpochMilliseconds
(long[] yearEpochMilliseconds) long
long[]
-
Method Details
-
loadUnixEpochOffsetMilliseconds
long loadUnixEpochOffsetMilliseconds() -
loadYearEpochMilliseconds
long[] loadYearEpochMilliseconds() -
loadDayEpochMilliseconds
long[] loadDayEpochMilliseconds(long[] yearEpochMilliseconds)
-