V
- Type of values that are added to the accumulatorR
- Type of the accumulator result as it will be reported to the
client@Public public interface Accumulator<V,R extends Serializable> extends Serializable, Cloneable
Modifier and Type | Method and Description |
---|---|
void |
add(V value) |
Accumulator<V,R> |
clone()
Duplicates the accumulator.
|
R |
getLocalValue() |
void |
merge(Accumulator<V,R> other)
Used by system internally to merge the collected parts of an accumulator
at the end of the job.
|
void |
resetLocal()
Reset the local value.
|
void add(V value)
value
- The value to add to the accumulator objectR getLocalValue()
void resetLocal()
void merge(Accumulator<V,R> other)
other
- Reference to accumulator to merge in.Accumulator<V,R> clone()
CloneNotSupportedException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.