Class LocalMMapAccumulator<K,​V>

    • Constructor Detail

      • LocalMMapAccumulator

        public LocalMMapAccumulator​(String name)
        Instantiates a new LocalMMapAccumulator.
        Parameters:
        name - the name of the accumulator
    • Method Detail

      • add

        public void add​(Tuple2<K,​V> objects)
        Description copied from interface: MAccumulator
        Adds an item to the accumulator
        Specified by:
        add in interface MAccumulator<K,​V>
        Parameters:
        objects - the item to add
      • value

        public Map<K,​V> value()
        Description copied from interface: MAccumulator
        The value of the accumulator.
        Specified by:
        value in interface MAccumulator<K,​V>
        Returns:
        the result of the accumulator
      • isZero

        public boolean isZero()
        Description copied from interface: MAccumulator
        Determines if the accumulator is a zero value
        Specified by:
        isZero in interface MAccumulator<K,​V>
        Returns:
        True if the accumulator is in a zero state
      • reset

        public void reset()
        Description copied from interface: MAccumulator
        Resets the accumulator to its zero-value.
        Specified by:
        reset in interface MAccumulator<K,​V>
      • put

        public void put​(K key,
                        V value)
        Description copied from interface: MMapAccumulator
        Adds the given key-value pair ot the map
        Specified by:
        put in interface MMapAccumulator<K,​V>
        Parameters:
        key - the key to add
        value - the value to associate with the key
      • putAll

        public void putAll​(Map<? extends K,​? extends V> other)
        Description copied from interface: MMapAccumulator
        Adds all entries of the given map overriding any current entries.
        Specified by:
        putAll in interface MMapAccumulator<K,​V>
        Parameters:
        other - the map whose key-value pairs are to be added