Package io.opentelemetry.sdk.internal
Class JavaVersionSpecific
- java.lang.Object
-
- io.opentelemetry.sdk.internal.JavaVersionSpecific
-
public class JavaVersionSpecific extends java.lang.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 Summary
Fields Modifier and Type Field Description private static JavaVersionSpecific
CURRENT
private static java.util.logging.Logger
logger
-
Constructor Summary
Constructors Constructor Description JavaVersionSpecific()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
currentTimeNanos()
Returns the number of nanoseconds since the epoch (00:00:00, 01-Jan-1970, GMT).static JavaVersionSpecific
get()
Returns theJavaVersionSpecific
for the current version of Java.(package private) java.lang.String
name()
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
CURRENT
private static final JavaVersionSpecific CURRENT
-
-
Method Detail
-
get
public static JavaVersionSpecific get()
Returns theJavaVersionSpecific
for the current version of Java.
-
name
java.lang.String name()
-
currentTimeNanos
public long currentTimeNanos()
Returns the number of nanoseconds since the epoch (00:00:00, 01-Jan-1970, GMT).
-
-