public abstract class AbstractClusterSelector extends Object implements ClusterSelector
doSelectCluster(org.axonframework.eventhandling.EventListener, Class) method, in such case, returns the Class of
the annotated listener.| Constructor and Description |
|---|
AbstractClusterSelector() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Cluster |
doSelectCluster(EventListener eventListener,
Class<?> listenerType)
Select a cluster for the given
eventListener, which has the actual class listenerType. |
Cluster |
selectCluster(EventListener eventListener)
Selects the cluster instance that the given
eventListener should be member of. |
public Cluster selectCluster(EventListener eventListener)
ClusterSelectoreventListener 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.selectCluster in interface ClusterSelectoreventListener - the event listener to select a cluster forprotected abstract Cluster doSelectCluster(EventListener eventListener, Class<?> listenerType)
eventListener, which has the actual class listenerType.
Note that the given listenerType does not have to be assignable to EventListener, as
it is possible that the eventListener acts as a proxy to an instance of listenerType.eventListener - The listener instance handling the events, possibly a proxylistenerType - The actual type of the Event ListenerCopyright © 2010-2014. All Rights Reserved.