/** * Creates a new key/value state for the given hash map of key/value pairs. * * @param stateTable The state table for which this state is associated to. * @param keySerializer The serializer for the keys. * @param valueSerializer The serializer for the state. * @param namespaceSerializer The serializer for the namespace. * @param defaultValue The default value for the state. * @param aggregateFunction The aggregating function used for aggregating state. */ public HeapAggregatingState( StateTable<K, N, ACC> stateTable, TypeSerializer<K> keySerializer, TypeSerializer<ACC> valueSerializer, TypeSerializer<N> namespaceSerializer, ACC defaultValue, AggregateFunction<IN, ACC, OUT> aggregateFunction) { super(stateTable, keySerializer, valueSerializer, namespaceSerializer, defaultValue); this.aggregateTransformation = new AggregateTransformation<>(aggregateFunction); }
/** * Creates a new key/value state for the given hash map of key/value pairs. * * @param stateTable The state table for which this state is associated to. * @param keySerializer The serializer for the keys. * @param valueSerializer The serializer for the state. * @param namespaceSerializer The serializer for the namespace. * @param defaultValue The default value for the state. * @param aggregateFunction The aggregating function used for aggregating state. */ private HeapAggregatingState( StateTable<K, N, ACC> stateTable, TypeSerializer<K> keySerializer, TypeSerializer<ACC> valueSerializer, TypeSerializer<N> namespaceSerializer, ACC defaultValue, AggregateFunction<IN, ACC, OUT> aggregateFunction) { super(stateTable, keySerializer, valueSerializer, namespaceSerializer, defaultValue); this.aggregateTransformation = new AggregateTransformation<>(aggregateFunction); }
/** * Creates a new key/value state for the given hash map of key/value pairs. * * @param stateDesc * The state identifier for the state. This contains name and can create a default state value. * @param stateTable * The state table to use in this kev/value state. May contain initial state. * @param namespaceSerializer * The serializer for the type that indicates the namespace */ public HeapAggregatingState( AggregatingStateDescriptor<IN, ACC, OUT> stateDesc, StateTable<K, N, ACC> stateTable, TypeSerializer<K> keySerializer, TypeSerializer<N> namespaceSerializer) { super(stateDesc, stateTable, keySerializer, namespaceSerializer); this.aggregateTransformation = new AggregateTransformation<>(stateDesc.getAggregateFunction()); }
/** * Creates a new key/value state for the given hash map of key/value pairs. * * @param stateTable The state table for which this state is associated to. * @param keySerializer The serializer for the keys. * @param valueSerializer The serializer for the state. * @param namespaceSerializer The serializer for the namespace. * @param defaultValue The default value for the state. * @param aggregateFunction The aggregating function used for aggregating state. */ private HeapAggregatingState( StateTable<K, N, ACC> stateTable, TypeSerializer<K> keySerializer, TypeSerializer<ACC> valueSerializer, TypeSerializer<N> namespaceSerializer, ACC defaultValue, AggregateFunction<IN, ACC, OUT> aggregateFunction) { super(stateTable, keySerializer, valueSerializer, namespaceSerializer, defaultValue); this.aggregateTransformation = new AggregateTransformation<>(aggregateFunction); }