Interface MetricsQuery
-
- All Known Implementing Classes:
MetricsQueryImpl
public interface MetricsQuery- Since:
- 7.3
- Author:
- Daniel Meyer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MetricsQueryaggregateByReporter()Aggregate metrics by reportersMetricsQueryendDate(java.util.Date endTime)Restrict to data collected before the given date (exclusive)java.util.List<MetricIntervalValue>interval()Returns the metrics summed up and aggregated on a time interval.java.util.List<MetricIntervalValue>interval(long interval)Returns the metrics summed up and aggregated on a time interval.MetricsQuerylimit(int maxResults)Sets the limit row count of the result.MetricsQueryname(java.lang.String name)MetricsQueryoffset(int offset)Sets the offset of the returned results.MetricsQueryreporter(java.lang.String reporter)Restrict to data collected by the reported with the given identifierMetricsQuerystartDate(java.util.Date startTime)Restrict to data collected after the given date (inclusive)longsum()
-
-
-
Method Detail
-
name
MetricsQuery name(java.lang.String name)
- Parameters:
name- The name of the metrics to query for- See Also:
in for a list of names which can be used here.
-
reporter
MetricsQuery reporter(java.lang.String reporter)
Restrict to data collected by the reported with the given identifier
-
startDate
MetricsQuery startDate(java.util.Date startTime)
Restrict to data collected after the given date (inclusive)
-
endDate
MetricsQuery endDate(java.util.Date endTime)
Restrict to data collected before the given date (exclusive)
-
offset
MetricsQuery offset(int offset)
Sets the offset of the returned results.- Parameters:
offset- indicates after which row the result begins- Returns:
- the adjusted MetricsQuery
-
limit
MetricsQuery limit(int maxResults)
Sets the limit row count of the result. Can't be set larger than 200, since it is the maximum row count which should be returned.- Parameters:
maxResults- the new row limit of the result- Returns:
- the adjusted MetricsQuery
-
aggregateByReporter
MetricsQuery aggregateByReporter()
Aggregate metrics by reporters- Returns:
- the adjusted MetricsQuery
-
interval
java.util.List<MetricIntervalValue> interval()
Returns the metrics summed up and aggregated on a time interval. Default interval is 900 (15 minutes). The list size has a maximum of 200 the maximum can be decreased with the MetricsQuery#limit method. Paging is enabled with the help of the offset.- Returns:
- the aggregated metrics
-
interval
java.util.List<MetricIntervalValue> interval(long interval)
Returns the metrics summed up and aggregated on a time interval. The size of the interval is given via parameter. The time unit is seconds! The list size has a maximum of 200 the maximum can be decreased with the MetricsQuery#limit method. Paging is enabled with the help of the offset.- Parameters:
interval- The time interval on which the metrics should be aggregated. The time unit is seconds.- Returns:
- the aggregated metrics
-
sum
long sum()
- Returns:
- the aggregated sum
-
-