public class MutableMetrics extends ImmutableMetrics implements Cloneable
annotations, counts, durationNs, id, name, nested
Modifier | Constructor and Description |
---|---|
protected |
MutableMetrics() |
|
MutableMetrics(Metrics other)
Create a
MutableMetrics from an immutable one. |
|
MutableMetrics(String id,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addNested(MutableMetrics metrics) |
void |
aggregate(MutableMetrics other) |
MutableMetrics |
clone() |
protected void |
copyMembers(ImmutableMetrics clone) |
void |
finish(long bulk) |
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 |
setCount(String key,
long val) |
void |
setDuration(long dur,
TimeUnit unit) |
void |
start() |
void |
stop() |
getAnnotation, getAnnotations, getCount, getCounts, getDuration, getId, getName, getNested, toString
protected MutableMetrics()
public MutableMetrics(Metrics other)
MutableMetrics
from an immutable one.public void addNested(MutableMetrics metrics)
public void start()
public void stop()
public void incrementCount(String key, long incr)
public void setDuration(long dur, TimeUnit unit)
public void setCount(String key, long val)
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()
protected void copyMembers(ImmutableMetrics clone)
public MutableMetrics clone()
public void finish(long bulk)
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.