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.Object
Aggregation
is the process of combining a certain set ofMeasureValue
s for a givenMeasure
into anAggregationData
.Aggregation
currently supports 4 types of basic aggregation:- Sum
- Count
- Distribution
- LastValue
When creating a
View
, oneAggregation
needs to be specified as how to aggregateMeasureValue
s.- Since:
- 0.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Aggregation.Count
Calculate count on aggregatedMeasureValue
s.static class
Aggregation.Distribution
Calculate distribution stats on aggregatedMeasureValue
s.static class
Aggregation.LastValue
Calculate the last value of aggregatedMeasureValue
s.static class
Aggregation.Mean
Deprecated.since 0.13, useAggregation.Distribution
instead.static class
Aggregation.Sum
Calculate sum on aggregatedMeasureValue
s.
-
Constructor Summary
Constructors Modifier Constructor Description private
Aggregation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
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
-
-