Class MetricsQueryImpl
java.lang.Object
org.camunda.bpm.engine.impl.db.ListQueryParameterObject
org.camunda.bpm.engine.impl.metrics.MetricsQueryImpl
- All Implemented Interfaces:
- Serializable,- Command<Object>,- MetricsQuery
public class MetricsQueryImpl
extends ListQueryParameterObject
implements Serializable, Command<Object>, MetricsQuery
- Author:
- Daniel Meyer
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classprotected class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected BooleanContains the command implementation which should be executed either metric sum or select metric grouped by time interval.protected CommandExecutorstatic final intstatic final longprotected Dateprotected Longprotected Longprotected Stringprotected Stringprotected Dateprotected LongFields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObjectauthCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAggregate metrics by reportersRestrict to data collected before the given date (exclusive)execute(CommandContext commandContext) intgetName()interval()Returns the metrics summed up and aggregated on a time interval.interval(long interval) Returns the metrics summed up and aggregated on a time interval.limit(int maxResults) Sets the limit row count of the result.offset(int offset) Sets the offset of the returned results.Restrict to data collected by the reported with the given identifiervoidsetMaxResults(int maxResults) Restrict to data collected after the given date (inclusive)longsum()Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObjectgetAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setOrderingProperties, setParameter, setTenantCheck
- 
Field Details- 
DEFAULT_LIMIT_SELECT_INTERVALpublic static final int DEFAULT_LIMIT_SELECT_INTERVAL- See Also:
 
- 
DEFAULT_SELECT_INTERVALpublic static final long DEFAULT_SELECT_INTERVAL- See Also:
 
- 
name
- 
reporter
- 
startDate
- 
endDate
- 
startDateMilliseconds
- 
endDateMilliseconds
- 
interval
- 
aggregateByReporter
- 
commandExecutor
- 
callbackContains the command implementation which should be executed either metric sum or select metric grouped by time interval. Note: this enables to quit with the enum distinction
 
- 
- 
Constructor Details- 
MetricsQueryImpl
 
- 
- 
Method Details- 
name- Specified by:
- namein interface- MetricsQuery
- Parameters:
- name- The name of the metrics to query for
- See Also:
- 
- in Metrics for a list of names which can be used here.
 
 
- 
reporterDescription copied from interface:MetricsQueryRestrict to data collected by the reported with the given identifier- Specified by:
- reporterin interface- MetricsQuery
 
- 
startDateDescription copied from interface:MetricsQueryRestrict to data collected after the given date (inclusive)- Specified by:
- startDatein interface- MetricsQuery
 
- 
endDateDescription copied from interface:MetricsQueryRestrict to data collected before the given date (exclusive)- Specified by:
- endDatein interface- MetricsQuery
 
- 
intervalDescription copied from interface:MetricsQueryReturns 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.- Specified by:
- intervalin interface- MetricsQuery
- Returns:
- the aggregated metrics
 
- 
intervalDescription copied from interface:MetricsQueryReturns 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.- Specified by:
- intervalin interface- MetricsQuery
- Parameters:
- interval- The time interval on which the metrics should be aggregated. The time unit is seconds.
- Returns:
- the aggregated metrics
 
- 
sumpublic long sum()- Specified by:
- sumin interface- MetricsQuery
- Returns:
- the aggregated sum
 
- 
execute
- 
offsetDescription copied from interface:MetricsQuerySets the offset of the returned results.- Specified by:
- offsetin interface- MetricsQuery
- Parameters:
- offset- indicates after which row the result begins
- Returns:
- the adjusted MetricsQuery
 
- 
limitDescription copied from interface:MetricsQuerySets 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.- Specified by:
- limitin interface- MetricsQuery
- Parameters:
- maxResults- the new row limit of the result
- Returns:
- the adjusted MetricsQuery
 
- 
aggregateByReporterDescription copied from interface:MetricsQueryAggregate metrics by reporters- Specified by:
- aggregateByReporterin interface- MetricsQuery
- Returns:
- the adjusted MetricsQuery
 
- 
setMaxResultspublic void setMaxResults(int maxResults) - Overrides:
- setMaxResultsin class- ListQueryParameterObject
 
- 
getStartDate
- 
getEndDate
- 
getStartDateMilliseconds
- 
getEndDateMilliseconds
- 
getName
- 
getReporter
- 
getInterval
- 
getMaxResultspublic int getMaxResults()- Overrides:
- getMaxResultsin class- ListQueryParameterObject
 
 
-