org.terracotta.management.registry
Class DefaultStatisticQuery

java.lang.Object
  extended by org.terracotta.management.registry.DefaultStatisticQuery
All Implemented Interfaces:
Query<ContextualStatistics>, StatisticQuery

public class DefaultStatisticQuery
extends Object
implements StatisticQuery

Author:
Mathieu Carbou

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.terracotta.management.registry.StatisticQuery
StatisticQuery.Builder
 
Constructor Summary
DefaultStatisticQuery(CapabilityManagementSupport capabilityManagement, String capabilityName, Collection<String> statisticNames, Collection<Context> contexts, long since)
           
 
Method Summary
 ResultSet<ContextualStatistics> execute()
           
 String getCapabilityName()
           
 Collection<Context> getContexts()
           
 long getSince()
          The query will only collect statistics computed since this time.
 Collection<String> getStatisticNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStatisticQuery

public DefaultStatisticQuery(CapabilityManagementSupport capabilityManagement,
                             String capabilityName,
                             Collection<String> statisticNames,
                             Collection<Context> contexts,
                             long since)
Method Detail

getCapabilityName

public String getCapabilityName()
Specified by:
getCapabilityName in interface Query<ContextualStatistics>
Returns:
The capability name used for this query

getContexts

public Collection<Context> getContexts()
Specified by:
getContexts in interface Query<ContextualStatistics>
Returns:
The list of context targeted by this query

getStatisticNames

public Collection<String> getStatisticNames()
Specified by:
getStatisticNames in interface StatisticQuery
Returns:
The list of statistic queried

getSince

public long getSince()
Description copied from interface: StatisticQuery
The query will only collect statistics computed since this time. This allows for example to filter out the list of returned values within some Statistic such as RateHistory

Specified by:
getSince in interface StatisticQuery
Returns:
A unix timestamp

execute

public ResultSet<ContextualStatistics> execute()
Specified by:
execute in interface Query<ContextualStatistics>
Returns:
The list of results of this query against all contexts, in the same order and same position of the Query.getContexts() list


Copyright © 2016. All Rights Reserved.