Class DownsamplingSpecification
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.opentsdb.query.DownsamplingSpecification
-
public class DownsamplingSpecification extends java.lang.ObjectSpecifies how to reduce the amount of returnedMetricValues from an OpenTSDB query. To support this, OpenTSDB queries support the notion of down-sampling, specifying a smallest time period between returnedMetricValues and a function (such as average or sum) to apply to the time-series value in each time period to represent the (single) reported value for the period. For example, data can be down-sampled such that only the average over a 10 minute period is reported. Refer to the OpenTSDB documentation for details.
-
-
Constructor Summary
Constructors Constructor Description DownsamplingSpecification(com.elastisys.scale.commons.json.types.TimeInterval interval, com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction function)Specifies a down-sampling using the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunctiongetFunction()The function used to aggregate data points within each sampling interval to a single value.com.elastisys.scale.commons.json.types.TimeIntervalgetInterval()The sampling interval.inthashCode()java.lang.StringtoString()voidvalidate()
-
-
-
Constructor Detail
-
DownsamplingSpecification
public DownsamplingSpecification(com.elastisys.scale.commons.json.types.TimeInterval interval, com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction function)Specifies a down-sampling using the specified parameters.- Parameters:
interval- The sampling interval.function- The function used to aggregate data points within each sampling interval to a single value.
-
-
Method Detail
-
getInterval
public com.elastisys.scale.commons.json.types.TimeInterval getInterval()
The sampling interval.- Returns:
-
getFunction
public com.elastisys.autoscaler.core.monitoring.metricstreamer.api.query.DownsampleFunction getFunction()
The function used to aggregate data points within each sampling interval to a single value.- Returns:
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
validate
public void validate() throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
-