Class ReducingStateDescriptor<T>

    • Constructor Detail

      • ReducingStateDescriptor

        public ReducingStateDescriptor​(@Nonnull
                                       String name,
                                       @Nonnull
                                       org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction,
                                       @Nonnull
                                       TypeInformation<T> typeInfo)
        Creates a new ReducingStateDescriptor with the given name and default value.
        Parameters:
        name - The (unique) name for the state.
        reduceFunction - The ReduceFunction used to aggregate the state.
        typeInfo - The type of the values in the state.
      • ReducingStateDescriptor

        public ReducingStateDescriptor​(@Nonnull
                                       String stateId,
                                       @Nonnull
                                       org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction,
                                       @Nonnull
                                       TypeSerializer<T> serializer)
        Create a new ReducingStateDescriptor with the given stateId and the given type serializer.
        Parameters:
        stateId - The (unique) stateId for the state.
        serializer - The type serializer for the values in the state.
      • ReducingStateDescriptor

        public ReducingStateDescriptor​(String name,
                                       org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction,
                                       Class<T> typeClass)
        Creates a new ReducingStateDescriptor with the given name, type, and default value.

        If this constructor fails (because it is not possible to describe the type via a class), consider using the ReducingStateDescriptor(String, ReduceFunction, TypeInformation) constructor.

        Parameters:
        name - The (unique) name for the state.
        reduceFunction - The ReduceFunction used to aggregate the state.
        typeClass - The type of the values in the state.
    • Method Detail

      • getReduceFunction

        public org.apache.flink.api.common.functions.ReduceFunction<T> getReduceFunction()
        Returns the reduce function to be used for the reducing state.