K - The type of the key.N - The type of the namespace.V - The type of value that the state state stores.public class RocksDBValueState<K,N,V> extends AbstractRocksDBState<K,N,V,org.apache.flink.api.common.state.ValueState<V>> implements org.apache.flink.runtime.state.internal.InternalValueState<K,N,V>
ValueState implementation that stores state in RocksDB.backend, columnFamily, defaultValue, keySerializationDataOutputView, keySerializationStream, writeOptions| Constructor and Description |
|---|
RocksDBValueState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
V defaultValue,
RocksDBKeyedStateBackend<K> backend)
Creates a new
RocksDBValueState. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.typeutils.TypeSerializer<K> |
getKeySerializer() |
org.apache.flink.api.common.typeutils.TypeSerializer<N> |
getNamespaceSerializer() |
org.apache.flink.api.common.typeutils.TypeSerializer<V> |
getValueSerializer() |
void |
update(V value) |
V |
value() |
clear, getDefaultValue, getSerializedValue, setCurrentNamespace, writeCurrentKeyWithGroupAndNamespace, writeKeyWithGroupAndNamespace, writeKeyWithGroupAndNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic RocksDBValueState(org.rocksdb.ColumnFamilyHandle columnFamily,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
V defaultValue,
RocksDBKeyedStateBackend<K> backend)
RocksDBValueState.columnFamily - The RocksDB column family that this state is associated to.namespaceSerializer - The serializer for the namespace.valueSerializer - The serializer for the state.defaultValue - The default value for the state.backend - The backend for which this state is bind to.public org.apache.flink.api.common.typeutils.TypeSerializer<K> getKeySerializer()
public org.apache.flink.api.common.typeutils.TypeSerializer<N> getNamespaceSerializer()
public org.apache.flink.api.common.typeutils.TypeSerializer<V> getValueSerializer()
public V value()
value in interface org.apache.flink.api.common.state.ValueState<V>public void update(V value) throws IOException
update in interface org.apache.flink.api.common.state.ValueState<V>IOExceptionCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.