Class ReducingStateDescriptor<T>
- java.lang.Object
-
- org.apache.flink.runtime.state.v2.StateDescriptor<T>
-
- org.apache.flink.runtime.state.v2.ReducingStateDescriptor<T>
-
- Type Parameters:
T
- The type of the values that can be added to the state.
- All Implemented Interfaces:
Serializable
public class ReducingStateDescriptor<T> extends StateDescriptor<T>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.state.v2.StateDescriptor
StateDescriptor.Type
-
-
Constructor Summary
Constructors Constructor Description ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, TypeInformation<T> typeInfo)
Creates a newReducingStateDescriptor
with the given name and default value.ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, TypeInformation<T> typeInfo, SerializerConfig serializerConfig)
Creates a newReducingStateDescriptor
with the given name and default value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReduceFunction<T>
getReduceFunction()
Returns the reduce function to be used for the reducing state.StateDescriptor.Type
getType()
Return the specificType
of described state.-
Methods inherited from class org.apache.flink.runtime.state.v2.StateDescriptor
enableTimeToLive, equals, getSerializer, getStateId, getTtlConfig, hashCode, toString
-
-
-
-
Constructor Detail
-
ReducingStateDescriptor
public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, TypeInformation<T> typeInfo)
Creates a newReducingStateDescriptor
with the given name and default value.- Parameters:
name
- The (unique) name for the state.reduceFunction
- TheReduceFunction
used to aggregate the state.typeInfo
- The type of the values in the state.
-
ReducingStateDescriptor
public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, TypeInformation<T> typeInfo, SerializerConfig serializerConfig)
Creates a newReducingStateDescriptor
with the given name and default value.- Parameters:
name
- The (unique) name for the state.reduceFunction
- TheReduceFunction
used to aggregate the state.typeInfo
- The type of the values in the state.
-
-
Method Detail
-
getReduceFunction
public ReduceFunction<T> getReduceFunction()
Returns the reduce function to be used for the reducing state.
-
getType
public StateDescriptor.Type getType()
Description copied from class:StateDescriptor
Return the specificType
of described state.- Specified by:
getType
in classStateDescriptor<T>
-
-