Class StateWithDeclaredNamespace<K,N,V>
- java.lang.Object
-
- org.apache.flink.runtime.asyncprocessing.declare.state.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.
-
-
Constructor Summary
Constructors Constructor Description StateWithDeclaredNamespace(InternalKeyedState<K,N,V> state, DeclaredVariable<N> declaredNamespace)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <N,S extends org.apache.flink.api.common.state.v2.State>
Screate(S state, DeclaredVariable<N> declaredNamespace)
protected void
resetNamespace()
Automatically called before any async state access.void
setCurrentNamespace(N namespace)
Set current namespace and access state under specified namespace afterward.
-
-
-
Constructor Detail
-
StateWithDeclaredNamespace
public StateWithDeclaredNamespace(@Nonnull InternalKeyedState<K,N,V> state, @Nonnull DeclaredVariable<N> declaredNamespace)
-
-
Method Detail
-
setCurrentNamespace
public void setCurrentNamespace(N namespace)
Description copied from interface:InternalPartitionedState
Set current namespace and access state under specified namespace afterward.- Specified by:
setCurrentNamespace
in interfaceInternalPartitionedState<K>
- Parameters:
namespace
- the specified namespace
-
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)
-
-