public class ImmutableMetrics extends Object implements Metrics, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
annotations |
protected Map<String,AtomicLong> |
counts |
protected long |
durationNs |
protected String |
id |
protected String |
name |
protected Map<String,ImmutableMetrics> |
nested |
| Modifier | Constructor and Description |
|---|---|
protected |
ImmutableMetrics() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAnnotation(String key)
Obtain the annotation with the specified key.
|
Map<String,Object> |
getAnnotations()
Obtain the annotations for this Metrics.
|
Long |
getCount(String key)
Get the count for the corresponding countKey.
|
Map<String,Long> |
getCounts()
Get the map of all counters.
|
long |
getDuration(TimeUnit unit)
Get the duration of execution time taken.
|
String |
getId()
Id of this Metrics.
|
String |
getName()
Name of this Metrics.
|
Collection<ImmutableMetrics> |
getNested()
Get the nested Metrics objects.
|
ImmutableMetrics |
getNested(String metricsId)
Get a nested Metrics object by Id.
|
String |
toString() |
protected String id
protected String name
protected Map<String,AtomicLong> counts
protected long durationNs
protected final Map<String,ImmutableMetrics> nested
public long getDuration(TimeUnit unit)
MetricsgetDuration in interface Metricspublic Long getCount(String key)
Metricspublic Map<String,Long> getCounts()
Metricspublic Collection<ImmutableMetrics> getNested()
Metricspublic ImmutableMetrics getNested(String metricsId)
Metricspublic Map<String,Object> getAnnotations()
MetricsgetAnnotations in interface Metricspublic Object getAnnotation(String key)
MetricsgetAnnotation in interface Metricskey - key of the annotation to obtain.Copyright © 2013–2015 Apache Software Foundation. All rights reserved.