K - The type of the key.N - The type of the namespace.V - The type of the value.public class HeapValueState<K,N,V> extends AbstractHeapState<K,N,V,org.apache.flink.api.common.state.ValueState<V>> implements InternalValueState<K,N,V>
ValueState that is snapshotted into files.currentNamespace, keySerializer, namespaceSerializer, stateTable, valueSerializer| Constructor and Description |
|---|
HeapValueState(StateTable<K,N,V> stateTable,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
V defaultValue)
Creates a new key/value state for the given hash map of key/value pairs.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.typeutils.TypeSerializer<K> |
getKeySerializer()
Returns the
TypeSerializer for the type of key this state is associated to. |
org.apache.flink.api.common.typeutils.TypeSerializer<N> |
getNamespaceSerializer()
Returns the
TypeSerializer for the type of namespace this state is associated to. |
org.apache.flink.api.common.typeutils.TypeSerializer<V> |
getValueSerializer()
Returns the
TypeSerializer for the type of value this state holds. |
void |
update(V value) |
V |
value() |
clear, getDefaultValue, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSerializedValue, setCurrentNamespacepublic HeapValueState(StateTable<K,N,V> stateTable, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, V defaultValue)
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.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,V>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,V>public org.apache.flink.api.common.typeutils.TypeSerializer<V> getValueSerializer()
InternalKvStateTypeSerializer for the type of value this state holds.getValueSerializer in interface InternalKvState<K,N,V>public V value()
value in interface org.apache.flink.api.common.state.ValueState<V>Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.