@Immutable public abstract class ServerStats extends Object
Modifier and Type | Method and Description |
---|---|
static ServerStats |
create(long lbLatencyNs,
long serviceLatencyNs,
byte traceOption)
Creates new
ServerStats from specified parameters. |
abstract long |
getLbLatencyNs()
Returns Load Balancer latency, a latency observed at Load Balancer.
|
abstract long |
getServiceLatencyNs()
Returns Service latency, a latency observed at Server.
|
abstract byte |
getTraceOption()
Returns Trace options, a set of bits indicating properties of trace.
|
public abstract long getLbLatencyNs()
public abstract long getServiceLatencyNs()
public abstract byte getTraceOption()
public static ServerStats create(long lbLatencyNs, long serviceLatencyNs, byte traceOption)
ServerStats
from specified parameters.lbLatencyNs
- Represents request processing latency observed on Load Balancer. It is
measured in nanoseconds. Must not be less than 0. Value of 0 represents that the latency is
not measured.serviceLatencyNs
- Represents request processing latency observed on Server. It is
measured in nanoseconds. Must not be less than 0. Value of 0 represents that the latency is
not measured.traceOption
- Represents set of bits to indicate properties of trace. Currently it used
only the least signification bit to represent sampling of the request on the server side.
Other bits are ignored.ServerStats
with specified fields.IllegalArgumentException
- if the arguments are out of range.