Package com.gengoai.stream.spark
Class SparkMDoubleAccumulator
- java.lang.Object
-
- com.gengoai.stream.spark.SparkMAccumulator<Double,Double>
-
- com.gengoai.stream.spark.SparkMDoubleAccumulator
-
- All Implemented Interfaces:
MAccumulator<Double,Double>
,MDoubleAccumulator
,Serializable
public class SparkMDoubleAccumulator extends SparkMAccumulator<Double,Double> implements MDoubleAccumulator
An implementation of a
MDoubleAccumulator
for spark streams- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.gengoai.stream.spark.SparkMAccumulator
accumulatorV2
-
-
Constructor Summary
Constructors Constructor Description SparkMDoubleAccumulator(String name)
Instantiates a new SparkMDoubleAccumulator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(double value)
Adds a primitive double value.Optional<String>
name()
The name of the accumulator-
Methods inherited from class com.gengoai.stream.spark.SparkMAccumulator
add, isZero, merge, register, reset, value
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.stream.MAccumulator
isZero, merge, register, report, reset, value
-
Methods inherited from interface com.gengoai.stream.MDoubleAccumulator
add
-
-
-
-
Constructor Detail
-
SparkMDoubleAccumulator
public SparkMDoubleAccumulator(String name)
Instantiates a new SparkMDoubleAccumulator.- Parameters:
name
- the name of the accumulator
-
-
Method Detail
-
add
public void add(double value)
Description copied from interface:MDoubleAccumulator
Adds a primitive double value.- Specified by:
add
in interfaceMDoubleAccumulator
- Parameters:
value
- the value to add
-
name
public Optional<String> name()
Description copied from interface:MAccumulator
The name of the accumulator- Specified by:
name
in interfaceMAccumulator<Double,Double>
- Overrides:
name
in classSparkMAccumulator<Double,Double>
- Returns:
- the optional name of the accumulator
-
-