java.lang.Object
org.apache.flink.table.runtime.operators.window.tvf.state.WindowListState<W>
All Implemented Interfaces:
WindowState<W>

public final class WindowListState<W> extends Object implements WindowState<W>
A wrapper of ListState which is easier to update based on window namespace.
  • Constructor Summary

    Constructors
    Constructor
    Description
    WindowListState(org.apache.flink.runtime.state.internal.InternalListState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData> windowState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(W window, org.apache.flink.table.data.RowData value)
    Updates the operator state accessible by get(W) by adding the given value to the list of values.
    void
    clear(W window)
    Removes the value mapped under current key and the given window.
    List<org.apache.flink.table.data.RowData>
    get(W window)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WindowListState

      public WindowListState(org.apache.flink.runtime.state.internal.InternalListState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData> windowState)
  • Method Details

    • clear

      public void clear(W window)
      Description copied from interface: WindowState
      Removes the value mapped under current key and the given window.
      Specified by:
      clear in interface WindowState<W>
    • get

      public List<org.apache.flink.table.data.RowData> get(W window) throws Exception
      Throws:
      Exception
    • add

      public void add(W window, org.apache.flink.table.data.RowData value) throws Exception
      Updates the operator state accessible by get(W) by adding the given value to the list of values. The next time get(W) is called (for the same state partition) the returned state will represent the updated list.

      If null is passed in, the state value will remain unchanged.

      Parameters:
      window - The namespace for the state.
      value - The new value for the state.
      Throws:
      Exception - Thrown if the system cannot access the state.