public class LoadBalancingChannelSelector extends AbstractChannelSelector
The LoadBalancingChannelSelector maintains an indexed list of active channels on which the load must be distributed. This implementation supports distributing load using either via ROUND_ROBIN or via RANDOM selection mechanism. The choice of selection mechanism defaults to ROUND_ROBIN type, but can be overridden via configuration.
Constructor and Description |
---|
LoadBalancingChannelSelector() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Context context)
Request the implementing class to (re)configure itself.
|
List<Channel> |
getOptionalChannels(Event event)
Returns a list of optional channels.
|
List<Channel> |
getRequiredChannels(Event event)
Returns a list of required channels.
|
getAllChannels, getChannelListFromNames, getChannelNameMap, getName, setChannels, setName
public List<Channel> getRequiredChannels(Event event)
ChannelSelector
public List<Channel> getOptionalChannels(Event event)
ChannelSelector
public void configure(Context context)
Configurable
Request the implementing class to (re)configure itself.
When configuration parameters are changed, they must be reflected by the component asap.
There are no thread safety guarantees on when configure might be called.
Copyright © 2009-2022 Apache Software Foundation. All Rights Reserved.