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 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
|
Object |
execute(CommandContext commandContext) |
Date |
getEndDate() |
String |
getName() |
Date |
getStartDate() |
MetricsQueryImpl |
name(String name) |
MetricsQueryImpl |
startDate(Date startDate)
Restrict to data collected after the given date
|
long |
sum() |
protected String name
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 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()
Copyright © 2018. All rights reserved.