Package org.apache.storm.metricstore
Class Metric
java.lang.Object
org.apache.storm.metricstore.Metric
- All Implemented Interfaces:
- Comparable<Metric>
Class containing metric values and all identifying fields to be stored in a MetricStore.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddValue(double value) Adds an additional value to the metric.intbooleanCheck if a Metric matches another object.longgetCount()doublegetMax()doublegetMin()getPort()doublegetSum()longdoublegetValue()voidsetAggLevel(AggLevel aggLevel) Set the aggLevel.voidsetCount(long count) voidsetMax(double max) voidsetMin(double min) voidsetSum(double sum) voidsetTimestamp(long timestamp) voidsetTopologyId(String topologyId) voidsetValue(double value) Initialize the metric value.toString()
- 
Constructor Details- 
Metricpublic 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.- Throws:
- MetricException
 
- 
MetricA Metric constructor with the same settings cloned from another.
 
- 
- 
Method Details- 
equalsCheck if a Metric matches another object.
- 
getAggLevel
- 
setAggLevelSet the aggLevel.- Throws:
- MetricException
 
- 
addValuepublic void addValue(double value) Adds an additional value to the metric.
- 
getSumpublic double getSum()
- 
setSumpublic void setSum(double sum) 
- 
getCountpublic long getCount()
- 
setCountpublic void setCount(long count) 
- 
getMinpublic double getMin()
- 
setMinpublic void setMin(double min) 
- 
getMaxpublic double getMax()
- 
setMaxpublic void setMax(double max) 
- 
getTopologyId
- 
setTopologyId
- 
getTimestamppublic long getTimestamp()
- 
setTimestamppublic void setTimestamp(long timestamp) 
- 
getValuepublic double getValue()
- 
setValuepublic void setValue(double value) Initialize the metric value.
- 
getMetricName
- 
getComponentId
- 
getExecutorId
- 
getHostname
- 
getStreamId
- 
getPort
- 
compareTo- Specified by:
- compareToin interface- Comparable<Metric>
 
- 
toString
 
-