public final class BigDecimalSumAggregator<I> extends AbstractAggregator<I,BigDecimal,BigDecimal> implements IdentifiedDataSerializable
attributePath| Constructor and Description |
|---|
BigDecimalSumAggregator() |
BigDecimalSumAggregator(String attributePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulateExtracted(BigDecimal value)
Accumulates a single extracted value.
|
BigDecimal |
aggregate()
Returns the result of the aggregation.
|
void |
combine(Aggregator aggregator)
Incorporates the intermediary result of the given aggregator to this instance of the aggregator.
|
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getId()
Returns type identifier for this class.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
accumulateonAccumulationFinished, onCombinationFinishedpublic BigDecimalSumAggregator()
public BigDecimalSumAggregator(String attributePath)
public void accumulateExtracted(BigDecimal value)
AbstractAggregatoraccumulateExtracted in class AbstractAggregator<I,BigDecimal,BigDecimal>value - If attributePath is not null the methods accumulates the value extracted from the attributePath.
If attributePath is null and the input object is a Map.Entry the method accumulates Map.Entry.getValue().
Otherwise the method accumulates the input value as-is.public void combine(Aggregator aggregator)
Aggregatorcombine in class Aggregator<I,BigDecimal>aggregator - aggregator providing intermediary results to be combined into the results of this aggregator.
The given aggregator has to be of the same class as the one that the method is being called on.public BigDecimal aggregate()
Aggregatoraggregate in class Aggregator<I,BigDecimal>public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.