Package com.gengoai.stream.spark
Class SparkMLongAccumulator
- java.lang.Object
-
- com.gengoai.stream.spark.SparkMAccumulator<Long,Long>
-
- com.gengoai.stream.spark.SparkMLongAccumulator
-
- All Implemented Interfaces:
MAccumulator<Long,Long>
,MLongAccumulator
,Serializable
public class SparkMLongAccumulator extends SparkMAccumulator<Long,Long> implements MLongAccumulator
An implementation of a
MLongAccumulator
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 SparkMLongAccumulator(String name)
Instantiates a new SparkMLongAccumulator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long value)
Adds the primitive long 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.MLongAccumulator
add
-
-
-
-
Constructor Detail
-
SparkMLongAccumulator
public SparkMLongAccumulator(String name)
Instantiates a new SparkMLongAccumulator- Parameters:
name
- the name of the accumulator
-
-
Method Detail
-
add
public void add(long value)
Description copied from interface:MLongAccumulator
Adds the primitive long value.- Specified by:
add
in interfaceMLongAccumulator
- 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<Long,Long>
- Overrides:
name
in classSparkMAccumulator<Long,Long>
- Returns:
- the optional name of the accumulator
-
-