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 MetricsQuery
name
- 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)
MetricsQuery
reporter
in interface MetricsQuery
public MetricsQueryImpl startDate(Date startDate)
MetricsQuery
startDate
in interface MetricsQuery
public MetricsQueryImpl endDate(Date endDate)
MetricsQuery
endDate
in interface MetricsQuery
public long sum()
sum
in interface MetricsQuery
public Object execute(CommandContext commandContext)
public Date getStartDate()
public Date getEndDate()
public String getName()
public String getReporter()
Copyright © 2018. All rights reserved.