org.apache.flume.channel

## Class ReplicatingChannelSelector

- java.lang.Object
- - org.apache.flume.channel.AbstractChannelSelector
  - - org.apache.flume.channel.ReplicatingChannelSelector

- All Implemented Interfaces:
    ChannelSelector, Configurable, NamedComponent

      public class ReplicatingChannelSelector
      extends AbstractChannelSelector

  Replicating channel selector. This selector allows the event to be placed in all the channels that the source is configured with.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CONFIG_OPTIONAL` Configuration to set a subset of the channels as optional.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReplicatingChannelSelector()`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class org.apache.flume.channel.AbstractChannelSelector

      `getAllChannels, getChannelListFromNames, getChannelNameMap, getName, setChannels, setName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CONFIG_OPTIONAL

          public static final String CONFIG_OPTIONAL

      Configuration to set a subset of the channels as optional.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ReplicatingChannelSelector

          public ReplicatingChannelSelector()

  - ### Method Detail

    - #### getRequiredChannels

          public List<Channel> getRequiredChannels(Event event)

      Description copied from interface: `ChannelSelector`
      Returns a list of required channels. A failure in writing the event to these channels must be communicated back to the source that received this event.
      Returns:
        the list of required channels that this selector has selected for the given event.

    - #### getOptionalChannels

          public List<Channel> getOptionalChannels(Event event)

      Description copied from interface: `ChannelSelector`
      Returns a list of optional channels. A failure in writing the event to these channels must be ignored.
      Returns:
        the list of optional channels that this selector has selected for the given event.

    - #### configure

          public void configure(Context context)

      Description copied from interface: `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-2016 Apache Software Foundation. All Rights Reserved.