Router used to colocate identical streamer events or events with identical affinity
key on the same node. Such collocation is often required to perform computations on
multiple events together, for example, find number of occurrences of a word in some
text. In this case you would collocate identical words together to make sure that
you can update their counts.
Affinity key for collocation of event together on the same node is specified
via
GridStreamerAffinityEventRouter.AffinityEvent.affinityKey() method. If event does not implement
GridStreamerAffinityEventRouter.AffinityEvent interface, then event itself will be used to determine affinity.