public class LongSum extends Object implements CombinerAggregator<Number,Long,Long>
Constructor and Description |
---|
LongSum() |
Modifier and Type | Method and Description |
---|---|
Long |
apply(Long aggregate,
Number value)
Updates the accumulator by applying the current accumulator with the value.
|
Long |
init()
The initial value of the accumulator to start with.
|
Long |
merge(Long accum1,
Long accum2)
Merges two accumulators and returns the merged accumulator.
|
Long |
result(Long accum)
Produces a result value out of the accumulator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of
public Long init()
CombinerAggregator
init
in interface CombinerAggregator<Number,Long,Long>
public Long apply(Long aggregate, Number value)
CombinerAggregator
apply
in interface CombinerAggregator<Number,Long,Long>
aggregate
- the current accumulatorvalue
- the valuepublic Long merge(Long accum1, Long accum2)
CombinerAggregator
merge
in interface CombinerAggregator<Number,Long,Long>
accum1
- the first accumulatoraccum2
- the second accumulatorpublic Long result(Long accum)
CombinerAggregator
result
in interface CombinerAggregator<Number,Long,Long>
accum
- the accumulatorCopyright © 2023 The Apache Software Foundation. All rights reserved.