public class Metric extends Object implements Comparable<Metric>
Class containing metric values and all identifying fields to be stored in a MetricStore.
Constructor and Description |
---|
Metric(Metric o)
A Metric constructor with the same settings cloned from another.
|
Metric(String name,
Long timestamp,
String topologyId,
double value,
String componentId,
String executorId,
String hostname,
String streamId,
int port,
AggLevel aggLevel)
Metric constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double value)
Adds an additional value to the metric.
|
int |
compareTo(Metric o) |
boolean |
equals(Object other)
Check if a Metric matches another object.
|
AggLevel |
getAggLevel() |
String |
getComponentId() |
long |
getCount() |
String |
getExecutorId() |
String |
getHostname() |
double |
getMax() |
String |
getMetricName() |
double |
getMin() |
Integer |
getPort() |
String |
getStreamId() |
double |
getSum() |
long |
getTimestamp() |
String |
getTopologyId() |
double |
getValue() |
void |
setAggLevel(AggLevel aggLevel)
Set the aggLevel.
|
void |
setCount(long count) |
void |
setMax(double max) |
void |
setMin(double min) |
void |
setSum(double sum) |
void |
setTimestamp(long timestamp) |
void |
setTopologyId(String topologyId) |
void |
setValue(double value)
Initialize the metric value.
|
String |
toString() |
public Metric(String name, Long timestamp, String topologyId, double value, String componentId, String executorId, String hostname, String streamId, int port, AggLevel aggLevel) throws MetricException
Metric constructor.
MetricException
public Metric(Metric o)
A Metric constructor with the same settings cloned from another.
public boolean equals(Object other)
Check if a Metric matches another object.
public AggLevel getAggLevel()
public void setAggLevel(AggLevel aggLevel) throws MetricException
Set the aggLevel.
MetricException
public void addValue(double value)
Adds an additional value to the metric.
public double getSum()
public void setSum(double sum)
public long getCount()
public void setCount(long count)
public double getMin()
public void setMin(double min)
public double getMax()
public void setMax(double max)
public String getTopologyId()
public void setTopologyId(String topologyId)
public long getTimestamp()
public void setTimestamp(long timestamp)
public double getValue()
public void setValue(double value)
Initialize the metric value.
public String getMetricName()
public String getComponentId()
public String getExecutorId()
public String getHostname()
public String getStreamId()
public Integer getPort()
public int compareTo(Metric o)
compareTo
in interface Comparable<Metric>
Copyright © 2019 The Apache Software Foundation. All rights reserved.