public class DefaultKeyedStateStoreV2 extends Object implements KeyedStateStoreV2
| Constructor and Description |
|---|
DefaultKeyedStateStoreV2(AsyncKeyedStateBackend asyncKeyedStateBackend) |
| Modifier and Type | Method and Description |
|---|---|
<IN,ACC,OUT> |
getAggregatingState(AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)
Gets a handle to the system's key/value aggregating state.
|
<T> org.apache.flink.api.common.state.v2.ListState<T> |
getListState(ListStateDescriptor<T> stateProperties)
Gets a handle to the system's key / value list state.
|
<UK,UV> org.apache.flink.api.common.state.v2.MapState<UK,UV> |
getMapState(MapStateDescriptor<UK,UV> stateProperties)
Gets a handle to the system's key/value map state.
|
<T> org.apache.flink.api.common.state.v2.ReducingState<T> |
getReducingState(ReducingStateDescriptor<T> stateProperties)
Gets a handle to the system's key/value reducing state.
|
<T> org.apache.flink.api.common.state.v2.ValueState<T> |
getValueState(ValueStateDescriptor<T> stateProperties)
Gets a handle to the system's
ValueState. |
public DefaultKeyedStateStoreV2(@Nonnull AsyncKeyedStateBackend asyncKeyedStateBackend)
public <T> org.apache.flink.api.common.state.v2.ValueState<T> getValueState(@Nonnull ValueStateDescriptor<T> stateProperties)
KeyedStateStoreV2ValueState. The key/value state is only accessible if
the function is executed on a KeyedStream. On each access, the state exposes the value for
the key of the element currently processed by the function. Each function may have multiple
partitioned states, addressed with different names.
Because the scope of each value is the key of the currently processed element, and the elements are distributed by the Flink runtime, the system can transparently scale out and redistribute the state and KeyedStream.
getValueState in interface KeyedStateStoreV2T - The type of value stored in the state.stateProperties - The descriptor defining the properties of the state.public <T> org.apache.flink.api.common.state.v2.ListState<T> getListState(@Nonnull ListStateDescriptor<T> stateProperties)
KeyedStateStoreV2getListState in interface KeyedStateStoreV2T - The type of value stored in the state.stateProperties - The descriptor defining the properties of the state.public <UK,UV> org.apache.flink.api.common.state.v2.MapState<UK,UV> getMapState(@Nonnull MapStateDescriptor<UK,UV> stateProperties)
KeyedStateStoreV2getMapState in interface KeyedStateStoreV2UK - The type of the user keys stored in the state.UV - The type of the user values stored in the state.stateProperties - The descriptor defining the properties of the state.public <T> org.apache.flink.api.common.state.v2.ReducingState<T> getReducingState(@Nonnull ReducingStateDescriptor<T> stateProperties)
KeyedStateStoreV2This state is only accessible if the function is executed on a KeyedStream.
getReducingState in interface KeyedStateStoreV2T - The type of value stored in the state.stateProperties - The descriptor defining the properties of the stats.public <IN,ACC,OUT> org.apache.flink.api.common.state.v2.AggregatingState<IN,OUT> getAggregatingState(@Nonnull AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)
KeyedStateStoreV2getAggregatingState in interface KeyedStateStoreV2IN - 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.stateProperties - The descriptor defining the properties of the stats.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.