Class StateDeclarations
- java.lang.Object
-
- org.apache.flink.api.common.state.StateDeclarations
-
@Experimental public class StateDeclarations extends Object
This is a helper class for declaring various states.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStateDeclarations.AggregatingStateDeclarationBuilder<IN,OUT,ACC>Builder forAggregatingStateDeclaration.static classStateDeclarations.ListStateDeclarationBuilder<T>Builder forListStateDeclaration.static classStateDeclarations.MapStateDeclarationBuilder<K,V>Builder forMapStateDeclaration.static classStateDeclarations.ReducingStateDeclarationBuilder<T>Builder forReducingStateDeclaration.static classStateDeclarations.ValueStateDeclarationBuilder<T>Builder forValueStateDeclaration.
-
Constructor Summary
Constructors Constructor Description StateDeclarations()
-
Method Summary
-
-
-
Method Detail
-
aggregatingStateBuilder
public static <IN,OUT,ACC> StateDeclarations.AggregatingStateDeclarationBuilder<IN,OUT,ACC> aggregatingStateBuilder(String name, TypeDescriptor<ACC> aggTypeDescriptor, AggregateFunction<IN,ACC,OUT> aggregateFunction)
Get the builder ofAggregatingStateDeclaration.
-
reducingStateBuilder
public static <T> StateDeclarations.ReducingStateDeclarationBuilder<T> reducingStateBuilder(String name, TypeDescriptor<T> typeInformation, ReduceFunction<T> reduceFunction)
Get the builder ofReducingStateDeclaration.
-
mapStateBuilder
public static <K,V> StateDeclarations.MapStateDeclarationBuilder<K,V> mapStateBuilder(String name, TypeDescriptor<K> keyTypeInformation, TypeDescriptor<V> valueTypeInformation)
Get the builder ofMapStateDeclaration.
-
listStateBuilder
public static <T> StateDeclarations.ListStateDeclarationBuilder<T> listStateBuilder(String name, TypeDescriptor<T> elementTypeInformation)
Get the builder ofListStateDeclaration.
-
valueStateBuilder
public <T> StateDeclarations.ValueStateDeclarationBuilder<T> valueStateBuilder(String name, TypeDescriptor<T> valueType)
Get the builder ofValueStateDeclaration.
-
aggregatingState
public static <IN,ACC,OUT> AggregatingStateDeclaration<IN,ACC,OUT> aggregatingState(String name, TypeDescriptor<ACC> aggTypeDescriptor, AggregateFunction<IN,ACC,OUT> aggregateFunction)
Get theAggregatingStateDeclarationof aggregating state. If you want to configure it more elaborately, useaggregatingStateBuilder(String, TypeDescriptor, AggregateFunction).
-
reducingState
public static <T> ReducingStateDeclaration<T> reducingState(String name, TypeDescriptor<T> typeInformation, ReduceFunction<T> reduceFunction)
Get theReducingStateDeclarationof list state. If you want to configure it more elaborately, usereducingStateBuilder(String, TypeDescriptor, ReduceFunction).
-
mapState
public static <K,V> MapStateDeclaration<K,V> mapState(String name, TypeDescriptor<K> keyTypeInformation, TypeDescriptor<V> valueTypeInformation)
Get theMapStateDeclarationof map state withStateDeclaration.RedistributionMode.NONE. If you want to configure it more elaborately, usemapStateBuilder(String, TypeDescriptor, TypeDescriptor).
-
listState
public static <T> ListStateDeclaration<T> listState(String name, TypeDescriptor<T> elementTypeInformation)
Get theListStateDeclarationof list state withStateDeclaration.RedistributionMode.NONE. If you want to configure it more elaborately, uselistStateBuilder(String, TypeDescriptor).
-
valueState
public static <T> ValueStateDeclaration<T> valueState(String name, TypeDescriptor<T> valueType)
Get theValueStateDeclarationof value state. If you want to configure it more elaborately, usevalueStateBuilder(String, TypeDescriptor).
-
-