Class JavaVersionSpecific

java.lang.Object
io.opentelemetry.sdk.internal.JavaVersionSpecific

public class JavaVersionSpecific extends Object
Contains APIs that are implemented differently based on the version of Java being run. This class implements the default, using Java 8 APIs, the minimum version supported by OpenTelemetry. All implementations in this class must be forwards-compatible on all Java versions because this class may be used outside the multi-release JAR, e.g., in testing or when a user shades without creating their own multi-release JAR.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Field Details

  • Constructor Details

    • JavaVersionSpecific

      public JavaVersionSpecific()
  • Method Details

    • get

      public static JavaVersionSpecific get()
      Returns the JavaVersionSpecific for the current version of Java.
    • name

      String name()
    • currentTimeNanos

      public long currentTimeNanos()
      Returns the number of nanoseconds since the epoch (00:00:00, 01-Jan-1970, GMT).