K - The type of the key.N - The type of the namespace.V - The type of the values in the list state.public class RocksDBListState<K,N,V> extends AbstractRocksDBState<K,N,org.apache.flink.api.common.state.ListState<V>,org.apache.flink.api.common.state.ListStateDescriptor<V>> implements org.apache.flink.api.common.state.ListState<V>
ListState implementation that stores state in RocksDB.
RocksDBStateBackend must ensure that we set the
StringAppendOperator on the column family that we use for our state since
we use the merge() call.
backend, columnFamily| Constructor and Description |
|---|
RocksDBListState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.ListStateDescriptor<V> stateDesc,
RocksDBStateBackend backend)
Creates a new
RocksDBListState. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(V value) |
Iterable<V> |
get() |
clear, dispose, setCurrentKey, setCurrentNamespace, snapshot, writeKeyAndNamespacepublic RocksDBListState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.state.ListStateDescriptor<V> stateDesc,
RocksDBStateBackend backend)
RocksDBListState.namespaceSerializer - The serializer for the namespace.stateDesc - The state identifier for the state. This contains name
and can create a default state value.public void add(V value) throws IOException
add in interface org.apache.flink.api.common.state.AppendingState<V,Iterable<V>>IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.