@Immutable public abstract class StatsContext extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StatsContext.Builder
Builder for
StatsContext. |
| Constructor and Description |
|---|
StatsContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract StatsContext.Builder |
builder()
Returns a builder based on this
StatsContext. |
abstract StatsContext |
record(MeasurementMap measurements)
Records the given measurements against this
StatsContext. |
abstract void |
serialize(OutputStream output)
Serializes the
StatsContext into the on-the-wire representation. |
StatsContext |
with(TagKey k1,
TagValue v1)
Shorthand for builder().set(k1, v1).build()
|
StatsContext |
with(TagKey k1,
TagValue v1,
TagKey k2,
TagValue v2)
Shorthand for builder().set(k1, v1).set(k2, v2).build()
|
StatsContext |
with(TagKey k1,
TagValue v1,
TagKey k2,
TagValue v2,
TagKey k3,
TagValue v3)
Shorthand for builder().set(k1, v1).set(k2, v2).set(k3, v3).build()
|
public abstract StatsContext.Builder builder()
StatsContext.public final StatsContext with(TagKey k1, TagValue v1)
public final StatsContext with(TagKey k1, TagValue v1, TagKey k2, TagValue v2)
public final StatsContext with(TagKey k1, TagValue v1, TagKey k2, TagValue v2, TagKey k3, TagValue v3)
public abstract StatsContext record(MeasurementMap measurements)
StatsContext.measurements - the measurements to record against the saved StatsContextpublic abstract void serialize(OutputStream output) throws IOException
StatsContext into the on-the-wire representation.
The inverse of StatsContextFactory.deserialize(java.io.InputStream) and should be
based on the StatsContext protobuf representation.
output - the OutputStream to add the serialized form of this StatsContext.IOException