Class MetadataType<T>
java.lang.Object
velox.api.layer1.dynamichistory.metadata.MetadataType<T>
- Type Parameters:
T- type of the value returned bygetMetadatawhen this token is used
- Direct Known Subclasses:
MetadataType.FirstEventTimeType
Selects which piece of metadata to request from
getMetadata.
Pass one of the tokens returned by the static methods of this class to getMetadata; the type of value you get
back is determined by the token you pass. For example:
FirstEventTime first = accessInterface.getMetadata(dataSource, instrumentInfo, MetadataType.firstEventTimeType())
.toCompletableFuture()
.orTimeout(5, TimeUnit.SECONDS)
.join();
Available metadata:
firstEventTimeType()— returnsFirstEventTime, the timestamp of the earliest event available for the instrument. Or nothing if metadata is not available
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMetadata token forFirstEventTime; obtain it fromfirstEventTimeType(). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionRequests the time of the earliest available event for the instrument.toString()
-
Field Details
-
type
Type of the value returned bygetMetadatafor this token.
-
-
Method Details
-
toString
-
firstEventTimeType
Requests the time of the earliest available event for the instrument. Can return response or nothing if there is no metadata for the given instrument, in case there is no history for it, or the server was unavailable at the moment when the request was made. When passed togetMetadata, the returned stage:- yields
FirstEventTime.Foundwith the earliest event time, orFirstEventTime.HistoryNotAvailableif the instrument has no history; - completes exceptionally (cause is
RequestTimeoutException) if the request times out. - completes exceptionally (cause is
ServerNotAvailableException) if the server is unavailable.
- Returns:
- a token that makes
getMetadatareturn aFirstEventTime
- yields
-