K - The type of the key.N - The type of the namespace.V - The type of the value.public class HeapListState<K,N,V> extends AbstractHeapMergingState<K,N,V,Iterable<V>,ArrayList<V>,ListState<V>,ListStateDescriptor<V>> implements InternalListState<N,V>
ListState that is snapshotted
into files.currentNamespace, keySerializer, namespaceSerializer, stateDesc, stateTable| Constructor and Description |
|---|
HeapListState(ListStateDescriptor<V> stateDesc,
StateTable<K,N,ArrayList<V>> stateTable,
TypeSerializer<K> keySerializer,
TypeSerializer<N> namespaceSerializer)
Creates a new key/value state for the given hash map of key/value pairs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(V value) |
Iterable<V> |
get() |
byte[] |
getSerializedValue(K key,
N namespace) |
protected ArrayList<V> |
mergeState(ArrayList<V> a,
ArrayList<V> b) |
mergeNamespacesclear, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeNamespacesgetSerializedValue, setCurrentNamespacepublic HeapListState(ListStateDescriptor<V> stateDesc, StateTable<K,N,ArrayList<V>> stateTable, TypeSerializer<K> keySerializer, TypeSerializer<N> namespaceSerializer)
stateDesc - The state identifier for the state. This contains name
and can create a default state value.stateTable - The state tab;e to use in this kev/value state. May contain initial state.public byte[] getSerializedValue(K key, N namespace) throws Exception
getSerializedValue in class AbstractHeapState<K,N,ArrayList<V>,ListState<V>,ListStateDescriptor<V>>ExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.