public class MetricsQueryImpl extends Object implements Serializable, Command<Object>, MetricsQuery
| Modifier and Type | Field and Description |
|---|---|
protected CommandExecutor |
commandExecutor |
protected Date |
endDate |
protected String |
name |
protected MetricsQueryType |
queryType |
protected String |
reporter |
protected Date |
startDate |
| Constructor and Description |
|---|
MetricsQueryImpl(CommandExecutor commandExecutor) |
| Modifier and Type | Method and Description |
|---|---|
MetricsQueryImpl |
endDate(Date endDate)
Restrict to data collected before the given date (exclusive)
|
Object |
execute(CommandContext commandContext) |
Date |
getEndDate() |
String |
getName() |
String |
getReporter() |
Date |
getStartDate() |
MetricsQueryImpl |
name(String name) |
MetricsQuery |
reporter(String reporter)
Restrict to data collected by the reported with the given identifier
|
MetricsQueryImpl |
startDate(Date startDate)
Restrict to data collected after the given date (inclusive)
|
long |
sum() |
protected String name
protected String reporter
protected Date startDate
protected Date endDate
protected MetricsQueryType queryType
protected transient CommandExecutor commandExecutor
public MetricsQueryImpl(CommandExecutor commandExecutor)
public MetricsQueryImpl name(String name)
name in interface MetricsQueryname - The name of the metrics to query forin {@link Metrics} for a list of names which can be used here.public MetricsQuery reporter(String reporter)
MetricsQueryreporter in interface MetricsQuerypublic MetricsQueryImpl startDate(Date startDate)
MetricsQuerystartDate in interface MetricsQuerypublic MetricsQueryImpl endDate(Date endDate)
MetricsQueryendDate in interface MetricsQuerypublic long sum()
sum in interface MetricsQuerypublic Object execute(CommandContext commandContext)
public Date getStartDate()
public Date getEndDate()
public String getName()
public String getReporter()
Copyright © 2018. All rights reserved.