K - The type of the key.N - The type of the namespace.SV - The type of the values in the state.S - The type of StateSD - The type of StateDescriptor for the State Spublic abstract class AbstractHeapMergingState<K,N,IN,OUT,SV,S extends State,SD extends StateDescriptor<S,?>> extends AbstractHeapState<K,N,SV,S,SD> implements InternalMergingState<N,IN,OUT>
MergingState (InternalMergingState)
that is stored on the heap.currentNamespace, keySerializer, namespaceSerializer, stateDesc, stateTable| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHeapMergingState(SD stateDesc,
StateTable<K,N,SV> 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 |
mergeNamespaces(N target,
Collection<N> sources)
Merges the state of the current key for the given source namespaces into the state of
the target namespace.
|
protected abstract SV |
mergeState(SV a,
SV b) |
clear, getSerializedValue, getSerializedValue, getStateTable, setCurrentNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSerializedValue, setCurrentNamespaceadd, getprotected AbstractHeapMergingState(SD stateDesc, StateTable<K,N,SV> 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 void mergeNamespaces(N target, Collection<N> sources) throws Exception
InternalMergingStatemergeNamespaces in interface InternalMergingState<N,IN,OUT>target - The target namespace where the merged state should be stored.sources - The source namespaces whose state should be merged.Exception - The method may forward exception thrown internally (by I/O or functions).Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.