Class AbstractAggregatingState<K,N,IN,ACC,OUT>
java.lang.Object
org.apache.flink.runtime.state.v2.AbstractKeyedState<K,N,ACC>
org.apache.flink.runtime.state.v2.AbstractAggregatingState<K,N,IN,ACC,OUT>
- Type Parameters:
K- The type of key the state is associated to.IN- The type of the values that are added into the state.ACC- TThe type of the accumulator (intermediate aggregation state).OUT- The type of the values that are returned from the state.
- All Implemented Interfaces:
org.apache.flink.api.common.state.v2.AggregatingState<IN,,OUT> org.apache.flink.api.common.state.v2.AppendingState<IN,,OUT, OUT> org.apache.flink.api.common.state.v2.MergingState<IN,,OUT, OUT> org.apache.flink.api.common.state.v2.State,InternalAggregatingState<K,,N, IN, ACC, OUT> InternalAppendingState<K,,N, IN, ACC, OUT, OUT> InternalKeyedState<K,,N, ACC> InternalMergingState<K,,N, IN, ACC, OUT, OUT> InternalPartitionedState<N>,InternalStateAccessible<ACC>
public class AbstractAggregatingState<K,N,IN,ACC,OUT>
extends AbstractKeyedState<K,N,ACC>
implements InternalAggregatingState<K,N,IN,ACC,OUT>
The default implementation of
AggregatingState, which delegates all async requests to
StateRequestHandler.-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class org.apache.flink.runtime.state.v2.AbstractKeyedState
stateRequestHandler -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAggregatingState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.state.v2.AggregatingStateDescriptor<IN, ACC, OUT> stateDescriptor) Creates a new AbstractKeyedState with the given asyncExecutionController and stateDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.apache.flink.api.common.state.v2.StateFuture<Void>org.apache.flink.api.common.state.v2.StateFuture<OUT>asyncGet()org.apache.flink.api.common.state.v2.StateFuture<ACC>Get internally stored value.org.apache.flink.api.common.state.v2.StateFuture<Void>asyncMergeNamespaces(N target, Collection<N> sources) Merges the state of the current key for the given source namespaces into the state of the target namespace.org.apache.flink.api.common.state.v2.StateFuture<Void>asyncUpdateInternal(ACC valueToStore) Update internally stored value.get()Get internally stored value.voidmergeNamespaces(N target, Collection<N> sources) Merges the state of the current key for the given source namespaces into the state of the target namespace.voidupdateInternal(ACC valueToStore) Update internally stored value.Methods inherited from class org.apache.flink.runtime.state.v2.AbstractKeyedState
asyncClear, clear, getStateDescriptor, getStateRequestHandler, getValueSerializer, handleRequest, handleRequestSync, setCurrentNamespaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.state.v2.internal.InternalPartitionedState
setCurrentNamespaceMethods inherited from interface org.apache.flink.api.common.state.v2.State
asyncClear, clear
-
Field Details
-
aggregateFunction
-
-
Constructor Details
-
AbstractAggregatingState
public AbstractAggregatingState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.state.v2.AggregatingStateDescriptor<IN, ACC, OUT> stateDescriptor) Creates a new AbstractKeyedState with the given asyncExecutionController and stateDescriptor.- Parameters:
stateRequestHandler- The async request handler for handling all requests.stateDescriptor- The properties of the state.
-
-
Method Details
-
asyncGet
-
asyncAdd
-
asyncGetInternal
Description copied from interface:InternalStateAccessibleGet internally stored value.- Specified by:
asyncGetInternalin interfaceInternalStateAccessible<K>- Returns:
- internally stored value.
-
asyncUpdateInternal
Description copied from interface:InternalStateAccessibleUpdate internally stored value.- Specified by:
asyncUpdateInternalin interfaceInternalStateAccessible<K>- Parameters:
valueToStore- new value to store.
-
get
-
add
-
asyncMergeNamespaces
public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncMergeNamespaces(N target, Collection<N> sources) Description copied from interface:InternalMergingStateMerges the state of the current key for the given source namespaces into the state of the target namespace.- Specified by:
asyncMergeNamespacesin interfaceInternalMergingState<K,N, IN, ACC, OUT, OUT> - Parameters:
target- The target namespace where the merged state should be stored.sources- The source namespaces whose state should be merged.
-
mergeNamespaces
Description copied from interface:InternalMergingStateMerges the state of the current key for the given source namespaces into the state of the target namespace.- Specified by:
mergeNamespacesin interfaceInternalMergingState<K,N, IN, ACC, OUT, OUT> - Parameters:
target- The target namespace where the merged state should be stored.sources- The source namespaces whose state should be merged.
-
getInternal
Description copied from interface:InternalStateAccessibleGet internally stored value.- Specified by:
getInternalin interfaceInternalStateAccessible<K>- Returns:
- internally stored value.
-
updateInternal
Description copied from interface:InternalStateAccessibleUpdate internally stored value.- Specified by:
updateInternalin interfaceInternalStateAccessible<K>- Parameters:
valueToStore- new value to store.
-