public abstract class Platform extends Object
Originally designed by OkHttp team, derived from okhttp3.internal.platform.Platform
Constructor | Description |
---|---|
Platform() |
Modifier and Type | Method | Description |
---|---|---|
Clock |
clock() |
|
static Platform |
get() |
|
zipkin2.Endpoint |
localEndpoint() |
|
abstract long |
nextTraceIdHigh() |
Returns the high 8-bytes for use in
128-bit trace IDs . |
abstract long |
randomLong() |
This class uses pseudo-random number generators to provision IDs.
|
zipkin2.reporter.Reporter<zipkin2.Span> |
reporter() |
|
abstract boolean |
zipkinV1Present() |
Ensure we don't raise a ClassNotFoundException calling deprecated methods
|
public abstract boolean zipkinV1Present()
public zipkin2.reporter.Reporter<zipkin2.Span> reporter()
public zipkin2.Endpoint localEndpoint()
public static Platform get()
public abstract long randomLong()
This optimizes speed over full coverage of 64-bits, which is why it doesn't share a SecureRandom
. It will use ThreadLocalRandom
unless used in JRE 6
which doesn't have the class.
public abstract long nextTraceIdHigh()
128-bit trace IDs
.
The upper 4-bytes are epoch seconds and the lower 4-bytes are random. This makes it convertible to Amazon X-Ray trace ID format v1.
public Clock clock()
Copyright © 2018 OpenZipkin. All rights reserved.