Interface AppendingState<IN,​OUT,​SYNCOUT>

    • Method Detail

      • asyncGet

        StateFuture<OUT> asyncGet()
        Returns the current value for the state asynchronously. 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 wrapped by a StateFuture.

        Returns:
        The operator state value corresponding to the current input or null wrapped by a StateFuture if the state is empty.
      • asyncAdd

        StateFuture<Void> asyncAdd​(IN value)
        Updates the operator state accessible by asyncGet() by adding the given value to the list of values asynchronously. The next time asyncGet() is called (for the same state partition) the returned state will represent the updated list.

        null value is not allowed to be passed in.

        Parameters:
        value - The new value for the state.
      • get

        SYNCOUT get()
        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.

        Returns:
        The operator state value corresponding to the current input or null if the state is empty.
      • add

        void add​(IN value)
        Updates the operator state accessible by get() by adding the given value to the list of values. The next time 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).

        Parameters:
        value - The new value for the state.