Package com.gengoai.stream
Interface MMultiCounterAccumulator<K1,K2>
-
- Type Parameters:
K1
- the first key type parameterK2
- the second key type parameter
- All Superinterfaces:
MAccumulator<Tuple2<K1,K2>,MultiCounter<K1,K2>>
,Serializable
- All Known Implementing Classes:
LocalMMultiCounterAccumulator
,SparkMMultiCounterAccumulator
public interface MMultiCounterAccumulator<K1,K2> extends MAccumulator<Tuple2<K1,K2>,MultiCounter<K1,K2>>
An accumulator forMultiCounter
s- Author:
- David B. Bracewell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
increment(K1 firstKey, K2 secondKey)
Increments the count of the two keys.void
increment(K1 firstKey, K2 secondKey, double value)
Increments the count of the two keys by the given value.void
merge(MultiCounter<K1,K2> other)
Merges the given MultiCounter with this accumulator
-
-
-
Method Detail
-
increment
void increment(K1 firstKey, K2 secondKey)
Increments the count of the two keys.- Parameters:
firstKey
- the first keysecondKey
- the second key
-
increment
void increment(K1 firstKey, K2 secondKey, double value)
Increments the count of the two keys by the given value.- Parameters:
firstKey
- the first keysecondKey
- the second keyvalue
- the amount to increment by
-
merge
void merge(MultiCounter<K1,K2> other)
Merges the given MultiCounter with this accumulator- Parameters:
other
- the MultiCounter to merge
-
-