T - The type of the values that can be added to the state.public class ReducingStateDescriptor<T> extends StateDescriptor<T>
StateDescriptor for ReducingState.StateDescriptor.Type| Constructor and Description |
|---|
ReducingStateDescriptor(String name,
org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo)
Creates a new
ReducingStateDescriptor with the given name and default value. |
ReducingStateDescriptor(String name,
org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction,
org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo,
org.apache.flink.api.common.serialization.SerializerConfig serializerConfig)
Creates a new
ReducingStateDescriptor with the given name and default value. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.functions.ReduceFunction<T> |
getReduceFunction()
Returns the reduce function to be used for the reducing state.
|
StateDescriptor.Type |
getType()
Return the specific
Type of described state. |
enableTimeToLive, equals, getSerializer, getStateId, getTtlConfig, hashCode, toStringpublic ReducingStateDescriptor(String name, org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction, org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo)
ReducingStateDescriptor with the given name and default value.name - The (unique) name for the state.reduceFunction - The ReduceFunction used to aggregate the state.typeInfo - The type of the values in the state.public ReducingStateDescriptor(String name, org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction, org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo, org.apache.flink.api.common.serialization.SerializerConfig serializerConfig)
ReducingStateDescriptor with the given name and default value.name - The (unique) name for the state.reduceFunction - The ReduceFunction used to aggregate the state.typeInfo - The type of the values in the state.public org.apache.flink.api.common.functions.ReduceFunction<T> getReduceFunction()
public StateDescriptor.Type getType()
StateDescriptorType of described state.getType in class StateDescriptor<T>Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.