org.axonframework.eventhandling
Interface ClusterSelector

All Known Implementing Classes:
AbstractClusterSelector, AnnotationClusterSelector, AutowiringClusterSelector, ClassNamePatternClusterSelector, ClassNamePrefixClusterSelector, CompositeClusterSelector, DefaultClusterSelector

public interface ClusterSelector

The ClusterSelector defines the mechanism that assigns each of the subscribed listeners to a Cluster instance. The selector does *not* need to subscribe the listener to that cluster.

Thread safety note: The implementation is expected to be thread safe.

Since:
1.2
Author:
Allard Buijze

Method Summary
 Cluster selectCluster(EventListener eventListener)
          Selects the cluster instance that the given eventListener should be member of.
 

Method Detail

selectCluster

Cluster selectCluster(EventListener eventListener)
Selects the cluster instance that the given eventListener should be member of. This may be an existing (or pre-configured) cluster, as well as a newly created cluster.

When null is returned, this may cause the Event Listener not to be subscribed to any cluster at all.

Parameters:
eventListener - the event listener to select a cluster for
Returns:
The Cluster assigned to the listener


Copyright © 2010-2016. All Rights Reserved.