K - The type of the key.N - The type of the namespace.UK - The type of the keys in the state.UV - The type of the values in the state.public class HeapMapState<K,N,UK,UV> extends AbstractHeapState<K,N,HashMap<UK,UV>,MapState<UK,UV>,MapStateDescriptor<UK,UV>> implements InternalMapState<N,UK,UV>
MapState that is snapshotted into files.currentNamespace, keySerializer, namespaceSerializer, stateDesc, stateTable| Constructor and Description |
|---|
HeapMapState(MapStateDescriptor<UK,UV> stateDesc,
StateTable<K,N,HashMap<UK,UV>> 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 |
|---|---|
boolean |
contains(UK userKey) |
Iterable<Map.Entry<UK,UV>> |
entries() |
UV |
get(UK userKey) |
byte[] |
getSerializedValue(K key,
N namespace) |
Iterator<Map.Entry<UK,UV>> |
iterator() |
Iterable<UK> |
keys() |
void |
put(UK userKey,
UV userValue) |
void |
putAll(Map<UK,UV> value) |
void |
remove(UK userKey) |
Iterable<UV> |
values() |
clear, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSerializedValue, setCurrentNamespacepublic HeapMapState(MapStateDescriptor<UK,UV> stateDesc, StateTable<K,N,HashMap<UK,UV>> 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 IOException
getSerializedValue in class AbstractHeapState<K,N,HashMap<UK,UV>,MapState<UK,UV>,MapStateDescriptor<UK,UV>>IOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.