Interface Accumulator<T>
- Type Parameters:
T
- The type of supporting data.
- All Superinterfaces:
Calculator<T>
- All Known Implementing Classes:
MaxStatistic.MaxAccumulator
,MinStatistic.MinAccumulator
,SumStatistic.SumAccumulator
Specialization of
Calculator
directly supporting streaming
calculations over Quantity
and CalculatedValue
streams.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot com)
-
Method Summary
Modifier and TypeMethodDescriptionaccumulate
(CalculatedValue<T> calculatedValue) Add the specifiedCalculatedValue
to the accumulated value.accumulate
(Quantity quantity) Add the specifiedQuantity
to the accumulated value.Methods inherited from interface com.arpnetworking.tsdcore.statistics.Calculator
calculate, getStatistic
-
Method Details
-
accumulate
Add the specifiedQuantity
to the accumulated value. It is permissible to mix calls to accumulate withQuantity
andCalculatedValue
.- Parameters:
quantity
- TheQuantity
to include in the accumulated value.- Returns:
- This
Accumulator
.
-
accumulate
Add the specifiedCalculatedValue
to the accumulated value. TheCalculatedValue
was produced by thisAccumulator
in a different context. For example, for a different time period or a different host. It is permissible to mix calls to accumulate withQuantity
andCalculatedValue
.- Parameters:
calculatedValue
- TheCalculatedValue
to include in the accumulated value.- Returns:
- This
Accumulator
.
-