IN
- The type of the values that are added to the state.ACC
- The type of the accumulator (intermediate aggregation state).OUT
- The type of the values that are returned from the state.public class AggregatingStateDescriptor<IN,ACC,OUT> extends StateDescriptor<ACC>
StateDescriptor
for AggregatingState
.
The type internally stored in the state is the type of the Accumulator
of the AggregateFunction
.
StateDescriptor.Type
Constructor and Description |
---|
AggregatingStateDescriptor(String stateId,
AggregateFunction<IN,ACC,OUT> aggregateFunction,
TypeInformation<ACC> typeInfo)
Create a new state descriptor with the given name, function, and type.
|
AggregatingStateDescriptor(String stateId,
AggregateFunction<IN,ACC,OUT> aggregateFunction,
TypeInformation<ACC> typeInfo,
SerializerConfig serializerConfig)
Create a new state descriptor with the given name, function, and type.
|
Modifier and Type | Method and Description |
---|---|
AggregateFunction<IN,ACC,OUT> |
getAggregateFunction()
Returns the Aggregate function for this state.
|
StateDescriptor.Type |
getType()
Return the specific
Type of described state. |
enableTimeToLive, equals, getSerializer, getStateId, getTtlConfig, hashCode, toString
public AggregatingStateDescriptor(@Nonnull String stateId, @Nonnull AggregateFunction<IN,ACC,OUT> aggregateFunction, @Nonnull TypeInformation<ACC> typeInfo)
stateId
- The (unique) name for the state.aggregateFunction
- The AggregateFunction
used to aggregate the state.typeInfo
- The type of the accumulator. The accumulator is stored in the state.public AggregatingStateDescriptor(@Nonnull String stateId, @Nonnull AggregateFunction<IN,ACC,OUT> aggregateFunction, @Nonnull TypeInformation<ACC> typeInfo, SerializerConfig serializerConfig)
stateId
- The (unique) name for the state.aggregateFunction
- The AggregateFunction
used to aggregate the state.typeInfo
- The type of the accumulator. The accumulator is stored in the state.serializerConfig
- The serializer related config used to generate TypeSerializer.public AggregateFunction<IN,ACC,OUT> getAggregateFunction()
public StateDescriptor.Type getType()
StateDescriptor
Type
of described state.getType
in class StateDescriptor<ACC>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.