Class HttpMillisecondStoreDataProvider
java.lang.Object
org.lukashian.store.provider.external.ExternalResourceMillisecondStoreDataProvider
org.lukashian.store.provider.external.http.HttpMillisecondStoreDataProvider
- All Implemented Interfaces:
MillisecondStoreDataProvider
- Direct Known Subclasses:
StandardEarthHttpMillisecondStoreDataProvider, StandardMarsHttpMillisecondStoreDataProvider
This implementation of
ExternalResourceMillisecondStoreDataProvider loads binary streams of long values from an HTTP location.
Please see ExternalResourceMillisecondStoreDataProvider for more details regarding the external resource mechanism.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionHttpMillisecondStoreDataProvider(String baseUrl) HttpMillisecondStoreDataProvider(String baseUrl, String unixEpochOffsetUrlExtension, String yearEpochMillisecondsUrlExtension, String dayEpochMillisecondsUrlExtension) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]Loads an array of bytes from the specified location.Methods inherited from class ExternalResourceMillisecondStoreDataProvider
loadDayEpochMilliseconds, loadUnixEpochOffsetMilliseconds, loadYearEpochMilliseconds
-
Constructor Details
-
HttpMillisecondStoreDataProvider
-
HttpMillisecondStoreDataProvider
-
-
Method Details
-
loadMillisecondsByteArray
Description copied from class:ExternalResourceMillisecondStoreDataProviderLoads an array of bytes from the specified location. This location is a concatenation of the base location and one of the extensions, depending on which of the values needs loading.This method needs to return a binary stream from the specified location. This binary stream should encode the long values that represent the milliseconds. Each consecutive 8 bytes of the stream should correspond to an individual millisecond. This binary stream is then decoded into an array of longs. For the unix epoch offset, only a single long value (i.e. 8 bytes) should be returned in the binary stream.
- Specified by:
loadMillisecondsByteArrayin classExternalResourceMillisecondStoreDataProvider- Throws:
IOExceptionInterruptedException
-