public class MutableMetrics extends ImmutableMetrics implements Cloneable
annotations, counts, durationNs, id, name, nested
Modifier | Constructor and Description |
---|---|
protected |
MutableMetrics() |
|
MutableMetrics(String id,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addNested(MutableMetrics metrics) |
void |
aggregate(MutableMetrics other) |
MutableMetrics |
clone() |
ImmutableMetrics |
getImmutableClone() |
MutableMetrics |
getNested(String metricsId)
Get a nested Metrics object by Id.
|
void |
incrementCount(String key,
long incr) |
void |
setAnnotation(String key,
Object value)
Set an annotation value.
|
void |
start() |
void |
stop() |
getAnnotation, getAnnotations, getCount, getCounts, getDuration, getId, getName, getNested, toString
public void addNested(MutableMetrics metrics)
public void start()
public void stop()
public void incrementCount(String key, long incr)
public void aggregate(MutableMetrics other)
public void setAnnotation(String key, Object value)
key
- value
- public MutableMetrics getNested(String metricsId)
Metrics
getNested
in interface Metrics
getNested
in class ImmutableMetrics
public ImmutableMetrics getImmutableClone()
public MutableMetrics clone()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.