Class StateWithDeclaredNamespace<K,​N,​V>

  • All Implemented Interfaces:
    org.apache.flink.api.common.state.v2.State, InternalKeyedState<K,​N,​V>, InternalPartitionedState<N>

    @Internal
    public abstract class StateWithDeclaredNamespace<K,​N,​V>
    extends Object
    implements InternalKeyedState<K,​N,​V>
    A partitioned state that wraps a declared namespace and hide the namespace switching from user. User will only use the state just like the public state APIs without any consideration on namespace.

    This wrap class is useful in DataStream window operation, where namespace is managed by the operator and user function is free from namespace manipulation.

    • Method Detail

      • resetNamespace

        protected void resetNamespace()
        Automatically called before any async state access.
      • create

        public static <N,​S extends org.apache.flink.api.common.state.v2.State> S create​(S state,
                                                                                              DeclaredVariable<N> declaredNamespace)