Class MultiKeyDispatcher<T extends com.fluxtion.api.StaticEventProcessor>
java.lang.Object
com.fluxtion.ext.streaming.api.group.MultiKeyDispatcher<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
com.fluxtion.api.StaticEventProcessor
public class MultiKeyDispatcher<T extends com.fluxtion.api.StaticEventProcessor>
extends java.lang.Object
implements com.fluxtion.api.StaticEventProcessor
Groups together StaticEventProcessor that have a shared MultiKey in a GroupBy
node. If there are multiple StaticEventProcessor of the same type in
different partitions this will index the StaticEventProcessor's and only
dispatch events that match the multikey to the relevant instances.
- Author:
- Greg Higgins [email protected]
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MultiKeyDispatcher(java.util.function.Function<T,GroupBy> groupbyAccessor)
-
Method Summary
Modifier and Type Method Description void
addToIndex(T newCalc)
void
index()
void
onEvent(java.lang.Object event)
void
publish(java.lang.Object event)
-
Constructor Details
-
Method Details
-
index
public void index() -
addToIndex
-
onEvent
public void onEvent(java.lang.Object event)- Specified by:
onEvent
in interfacecom.fluxtion.api.StaticEventProcessor
-
publish
public void publish(java.lang.Object event)
-