public class CompositeClusterSelector extends Object implements ClusterSelector
Constructor and Description |
---|
CompositeClusterSelector(List<ClusterSelector> delegates)
Initializes the CompositeClusterSelector with the given List of
delegates . |
Modifier and Type | Method and Description |
---|---|
Cluster |
selectCluster(EventListener eventListener)
Selects the cluster instance that the given
eventListener should be member of. |
public CompositeClusterSelector(List<ClusterSelector> delegates)
delegates
. The delegates are
evaluated in the order provided by the List's iterator.delegates
- the delegates to evaluatepublic Cluster selectCluster(EventListener eventListener)
ClusterSelector
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.selectCluster
in interface ClusterSelector
eventListener
- the event listener to select a cluster forCopyright © 2010-2014. All Rights Reserved.