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.public class MemFoldingState<K,N,T,ACC> extends AbstractMemState<K,N,ACC,org.apache.flink.api.common.state.FoldingState<T,ACC>,org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC>> implements org.apache.flink.api.common.state.FoldingState<T,ACC>
FoldingState that is
snapshotted into a serialized memory copy.| Modifier and Type | Class and Description |
|---|---|
static class |
MemFoldingState.Snapshot<K,N,T,ACC> |
currentKey, currentNamespace, currentNSState, keySerializer, namespaceSerializer, state, stateDesc, stateSerializer| Constructor and Description |
|---|
MemFoldingState(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc) |
MemFoldingState(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc,
HashMap<N,Map<K,ACC>> state) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value) |
KvStateSnapshot<K,N,org.apache.flink.api.common.state.FoldingState<T,ACC>,org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC>,MemoryStateBackend> |
createHeapSnapshot(byte[] bytes) |
ACC |
get() |
snapshotclear, dispose, getKeySerializer, getNamespaceSerializer, setCurrentKey, setCurrentNamespace, sizepublic MemFoldingState(org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc)
public ACC get()
public void add(T value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<T,ACC>IOExceptionpublic KvStateSnapshot<K,N,org.apache.flink.api.common.state.FoldingState<T,ACC>,org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC>,MemoryStateBackend> createHeapSnapshot(byte[] bytes)
createHeapSnapshot in class AbstractMemState<K,N,ACC,org.apache.flink.api.common.state.FoldingState<T,ACC>,org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC>>Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.