MetricsRecord@VisibleForTesting
public class MetricsRecordImpl
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected static java.lang.String |
DEFAULT_CONTEXT |
| Constructor | Description |
|---|---|
MetricsRecordImpl(MetricsInfo info,
long timestamp,
java.util.List<MetricsTag> tags,
java.lang.Iterable<AbstractMetric> metrics) |
Construct a metrics record
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
context() |
|
java.lang.String |
description() |
|
boolean |
equals(java.lang.Object obj) |
|
int |
hashCode() |
|
java.lang.Iterable<AbstractMetric> |
metrics() |
Get the metrics of the record
|
java.lang.String |
name() |
|
java.util.List<MetricsTag> |
tags() |
Get the tags of the record
Note: returning a collection instead of iterable as we
need to use tags as keys (hence Collection#hashCode etc.) in maps
|
long |
timestamp() |
Get the timestamp of the metrics
|
java.lang.String |
toString() |
protected static final java.lang.String DEFAULT_CONTEXT
public MetricsRecordImpl(MetricsInfo info, long timestamp, java.util.List<MetricsTag> tags, java.lang.Iterable<AbstractMetric> metrics)
info - MetricsInfo of the recordtimestamp - of the recordtags - of the recordmetrics - of the recordpublic long timestamp()
MetricsRecordpublic java.lang.String name()
public java.lang.String description()
public java.lang.String context()
public java.util.List<MetricsTag> tags()
MetricsRecordpublic java.lang.Iterable<AbstractMetric> metrics()
MetricsRecordpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.