Package io.opencensus.stats
Class Aggregation
- java.lang.Object
-
- io.opencensus.stats.Aggregation
-
- Direct Known Subclasses:
Aggregation.Count,Aggregation.Distribution,Aggregation.LastValue,Aggregation.Mean,Aggregation.Sum
@Immutable public abstract class Aggregation extends java.lang.ObjectAggregationis the process of combining a certain set ofMeasureValues for a givenMeasureinto anAggregationData.Aggregationcurrently supports 4 types of basic aggregation:- Sum
- Count
- Distribution
- LastValue
When creating a
View, oneAggregationneeds to be specified as how to aggregateMeasureValues.- Since:
- 0.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregation.CountCalculate count on aggregatedMeasureValues.static classAggregation.DistributionCalculate distribution stats on aggregatedMeasureValues.static classAggregation.LastValueCalculate the last value of aggregatedMeasureValues.static classAggregation.MeanDeprecated.since 0.13, useAggregation.Distributioninstead.static classAggregation.SumCalculate sum on aggregatedMeasureValues.
-
Constructor Summary
Constructors Modifier Constructor Description privateAggregation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract <T> Tmatch(Function<? super Aggregation.Sum,T> p0, Function<? super Aggregation.Count,T> p1, Function<? super Aggregation.Distribution,T> p2, Function<? super Aggregation.LastValue,T> p3, Function<? super Aggregation,T> defaultFunction)Applies the given match function to the underlying data type.
-
-
-
Method Detail
-
match
public abstract <T> T match(Function<? super Aggregation.Sum,T> p0, Function<? super Aggregation.Count,T> p1, Function<? super Aggregation.Distribution,T> p2, Function<? super Aggregation.LastValue,T> p3, Function<? super Aggregation,T> defaultFunction)
Applies the given match function to the underlying data type.- Since:
- 0.13
-
-