public abstract class Platform extends Object implements Clock, zipkin.reporter.Reporter<zipkin.Span>
Originally designed by OkHttp team, derived from okhttp3.internal.platform.Platform
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMicroseconds()
gets a timestamp based on duration since the create tick.
|
static Platform |
get() |
zipkin.Endpoint |
localEndpoint() |
abstract long |
randomLong()
This class uses pseudo-random number generators to provision IDs.
|
void |
report(zipkin.Span span) |
public void report(zipkin.Span span)
report in interface zipkin.reporter.Reporter<zipkin.Span>public zipkin.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 long currentTimeMicroseconds()
currentTimeMicroseconds in interface ClockCopyright © 2017 OpenZipkin. All rights reserved.