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 RocksDBFoldingState<K,N,T,ACC> extends AbstractRocksDBState<K,N,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 implementation that stores state in RocksDB.backend, columnFamily| Constructor and Description |
|---|
RocksDBFoldingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc,
RocksDBStateBackend backend)
Creates a new
RocksDBFoldingState. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value) |
ACC |
get() |
clear, dispose, setCurrentKey, setCurrentNamespace, snapshot, writeKeyAndNamespacepublic RocksDBFoldingState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateDesc,
RocksDBStateBackend backend)
RocksDBFoldingState.namespaceSerializer - The serializer for the namespace.stateDesc - The state identifier for the state. This contains name
and can create a default state value.public ACC get()
public void add(T value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<T,ACC>IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.