Class MetadataType<T>

java.lang.Object
velox.api.layer1.dynamichistory.metadata.MetadataType<T>
Type Parameters:
T - type of the value returned by getMetadata when this token is used
Direct Known Subclasses:
MetadataType.FirstEventTimeType

public abstract sealed class MetadataType<T> extends Object permits 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:

  • Field Details

    • type

      public final Class<T> type
      Type of the value returned by getMetadata for this token.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • firstEventTimeType

      public static MetadataType.FirstEventTimeType 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 to getMetadata, the returned stage: NOTE: All listed exception are wrapped into CompletionException
      Returns:
      a token that makes getMetadata return a FirstEventTime