- java.lang.Object
-
- com.pervasive.datarush.monitoring.StatisticSuppliers
-
public final class StatisticSuppliers extends Object
Miscellaneous utilities for working withStatisticSupplier's.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StatisticsMapaggregate(List<RuntimeStatistic<?>> details)Performs aggregation across statistic details by the standard aggregation defined for eachStatisticDefinition.static StatisticSuppliercombine(StatisticDefinition<?> definition, List<? extends StatisticSupplier> suppliers)Creates a statistics supplier that combines the given set of suppliers.
-
-
-
Method Detail
-
combine
public static StatisticSupplier combine(StatisticDefinition<?> definition, List<? extends StatisticSupplier> suppliers)
Creates a statistics supplier that combines the given set of suppliers. Similar toStatisticDefinition.aggregate(List)the key difference is that the returned value is live rather than a snapshot.- Parameters:
definition- the definitionsuppliers- the list of suppliers- Returns:
- a live statistics supplier whose methods aggregate the components
- Throws:
ClassCastException- if any of the values are not of the typed expected by the definition.
-
aggregate
public static StatisticsMap aggregate(List<RuntimeStatistic<?>> details)
Performs aggregation across statistic details by the standard aggregation defined for eachStatisticDefinition. Statistics are first grouped by definition and then aggregated.- Parameters:
details- the list of statistics to aggregate- Returns:
- the aggregated statistics
-
-