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
Aggregation
is the process of combining a certain set of MeasureValue
s for a
given Measure
into an AggregationData
.
Aggregation
currently supports 4 types of basic aggregation:
- Sum
- Count
- Distribution
- LastValue
When creating a View
, one Aggregation
needs to be specified as how to
aggregate MeasureValue
s.
- Since:
- 0.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Calculate count on aggregatedMeasureValue
s.static class
Calculate distribution stats on aggregatedMeasureValue
s.static class
Calculate the last value of aggregatedMeasureValue
s.static class
Deprecated.static class
Calculate sum on aggregatedMeasureValue
s. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract <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.
-
Constructor Details
-
Aggregation
private Aggregation()
-
-
Method Details
-
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
-
Aggregation.Distribution
instead.