K - The type of the key.N - The type of the namespace.T - The type of the values that can be folded into the state.ACC - The type of the value in the folding state.@Deprecated public class HeapFoldingState<K,N,T,ACC> extends AbstractHeapState<K,N,ACC,org.apache.flink.api.common.state.FoldingState<T,ACC>> implements InternalFoldingState<K,N,T,ACC>
FoldingState that is snapshotted into files.currentNamespace, keySerializer, namespaceSerializer, stateTable, valueSerializer| Constructor and Description |
|---|
HeapFoldingState(StateTable<K,N,ACC> stateTable,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<ACC> valueSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
ACC defaultValue,
org.apache.flink.api.common.functions.FoldFunction<T,ACC> foldFunction)
Deprecated.
Creates a new key/value state for the given hash map of key/value pairs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value)
Deprecated.
|
ACC |
get()
Deprecated.
|
org.apache.flink.api.common.typeutils.TypeSerializer<K> |
getKeySerializer()
Deprecated.
Returns the
TypeSerializer for the type of key this state is associated to. |
org.apache.flink.api.common.typeutils.TypeSerializer<N> |
getNamespaceSerializer()
Deprecated.
Returns the
TypeSerializer for the type of namespace this state is associated to. |
org.apache.flink.api.common.typeutils.TypeSerializer<ACC> |
getValueSerializer()
Deprecated.
Returns the
TypeSerializer for the type of value this state holds. |
clear, getDefaultValue, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSerializedValue, setCurrentNamespacepublic HeapFoldingState(StateTable<K,N,ACC> stateTable, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<ACC> valueSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, ACC defaultValue, org.apache.flink.api.common.functions.FoldFunction<T,ACC> foldFunction)
stateTable - The state table for which this state is associated to.keySerializer - The serializer for the keys.valueSerializer - The serializer for the state.namespaceSerializer - The serializer for the namespace.defaultValue - The default value for the state.foldFunction - The fold function used for folding state.public org.apache.flink.api.common.typeutils.TypeSerializer<K> getKeySerializer()
InternalKvStateTypeSerializer for the type of key this state is associated to.getKeySerializer in interface InternalKvState<K,N,ACC>public org.apache.flink.api.common.typeutils.TypeSerializer<N> getNamespaceSerializer()
InternalKvStateTypeSerializer for the type of namespace this state is associated to.getNamespaceSerializer in interface InternalKvState<K,N,ACC>public org.apache.flink.api.common.typeutils.TypeSerializer<ACC> getValueSerializer()
InternalKvStateTypeSerializer for the type of value this state holds.getValueSerializer in interface InternalKvState<K,N,ACC>public ACC get()
public void add(T value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<T,ACC>IOExceptionCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.