Class ImmutableListState<V>

    • Method Detail

      • get

        public Iterable<V> get()
        Description copied from interface: AppendingState
        Returns the current value for the state. When the state is not partitioned the returned value is the same for all inputs in a given operator instance. If state partitioning is applied, the value returned depends on the current operator input, as the operator maintains an independent state for each partition.

        NOTE TO IMPLEMENTERS: if the state is empty, then this method should return null.

        Specified by:
        get in interface AppendingState<V,​Iterable<V>>
        Returns:
        The operator state value corresponding to the current input or null if the state is empty.
      • add

        public void add​(V value)
        Description copied from interface: AppendingState
        Updates the operator state accessible by AppendingState.get() by adding the given value to the list of values. The next time AppendingState.get() is called (for the same state partition) the returned state will represent the updated list.

        If null is passed in, the behaviour is undefined (implementation related). TODO: An unified behaviour across all sub-classes.

        Specified by:
        add in interface AppendingState<V,​Iterable<V>>
        Parameters:
        value - The new value for the state.
      • clear

        public void clear()
        Description copied from interface: State
        Removes the value mapped under the current key.
        Specified by:
        clear in interface State
      • update

        public void update​(List<V> values)
        Description copied from interface: ListState
        Updates the operator state accessible by AppendingState.get() by updating existing values to the given list of values. The next time AppendingState.get() is called (for the same state partition) the returned state will represent the updated list.

        If an empty list is passed in, the state value will be null.

        Null value passed in or any null value in list is not allowed.

        Specified by:
        update in interface ListState<V>
        Parameters:
        values - The new values for the state.
      • addAll

        public void addAll​(List<V> values)
        Description copied from interface: ListState
        Updates the operator state accessible by AppendingState.get() by adding the given values to existing list of values. The next time AppendingState.get() is called (for the same state partition) the returned state will represent the updated list.

        If an empty list is passed in, the state value remains unchanged.

        Null value passed in or any null value in list is not allowed.

        Specified by:
        addAll in interface ListState<V>
        Parameters:
        values - The new values to be added to the state.