public final class ServerStatsEncoding extends Object
ServerStats as defined by the spec.
See opencensus-server-stats-specs
for encoding ServerStats
Use ServerStatsEncoding.toBytes(ServerStats stats) to encode.
Use ServerStatsEncoding.parseBytes(byte[] serialized) to decode.
| Modifier and Type | Field and Description |
|---|---|
static byte |
CURRENT_VERSION
The current encoding version.
|
| Modifier and Type | Method and Description |
|---|---|
static ServerStats |
parseBytes(byte[] serialized)
Decodes serialized byte array to create
ServerStats as per Opencensus Summary Span
specification. |
static byte[] |
toBytes(ServerStats stats)
Encodes the
ServerStats as per the Opencensus Summary Span specification. |
public static final byte CURRENT_VERSION
public static byte[] toBytes(ServerStats stats)
ServerStats as per the Opencensus Summary Span specification.stats - ServerStats to encode.public static ServerStats parseBytes(byte[] serialized) throws ServerStatsDeserializationException
ServerStats as per Opencensus Summary Span
specification.serialized - encoded ServerStats in byte array.ServerStats. null if decoding fails.ServerStatsDeserializationException