org.apache.flume.channel
Class AbstractChannelSelector

java.lang.Object
  extended by org.apache.flume.channel.AbstractChannelSelector
All Implemented Interfaces:
ChannelSelector, Configurable, NamedComponent
Direct Known Subclasses:
MultiplexingChannelSelector, ReplicatingChannelSelector

public abstract class AbstractChannelSelector
extends Object
implements ChannelSelector


Constructor Summary
AbstractChannelSelector()
           
 
Method Summary
 List<Channel> getAllChannels()
           
protected  List<Channel> getChannelListFromNames(String channels, Map<String,Channel> channelNameMap)
          Given a list of channel names as space delimited string, returns list of channels.
protected  Map<String,Channel> getChannelNameMap()
           
 String getName()
           
 void setChannels(List<Channel> channels)
           
 void setName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.flume.ChannelSelector
getOptionalChannels, getRequiredChannels
 
Methods inherited from interface org.apache.flume.conf.Configurable
configure
 

Constructor Detail

AbstractChannelSelector

public AbstractChannelSelector()
Method Detail

getAllChannels

public List<Channel> getAllChannels()
Specified by:
getAllChannels in interface ChannelSelector
Returns:
the list of all channels that this selector is configured to work with.

setChannels

public void setChannels(List<Channel> channels)
Specified by:
setChannels in interface ChannelSelector
Parameters:
channels - all channels the selector could select from.

setName

public void setName(String name)
Specified by:
setName in interface NamedComponent

getName

public String getName()
Specified by:
getName in interface NamedComponent

getChannelNameMap

protected Map<String,Channel> getChannelNameMap()
Returns:
A map of name to channel instance.

getChannelListFromNames

protected List<Channel> getChannelListFromNames(String channels,
                                                Map<String,Channel> channelNameMap)
Given a list of channel names as space delimited string, returns list of channels.

Returns:
List of Channels represented by the names.


Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.