org.apache.flume.channel
Class ChannelProcessor

java.lang.Object
  extended by org.apache.flume.channel.ChannelProcessor

public class ChannelProcessor
extends Object

A channel processor exposes operations to put Events into Channels. These operations will propagate a ChannelException if any errors occur while attempting to write to required channels. Each channel processor instance is configured with a ChannelSelector instance that specifies which channels are required and which channels are optional.


Constructor Summary
ChannelProcessor(ChannelSelector selector)
           
 
Method Summary
 ChannelSelector getSelector()
           
 void processEvent(Event event)
          Attempts to put the given event into each configured channel.
 void processEventBatch(List<Event> events)
          Attempts to put the given events into each configured channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelProcessor

public ChannelProcessor(ChannelSelector selector)
Method Detail

getSelector

public ChannelSelector getSelector()

processEventBatch

public void processEventBatch(List<Event> events)
Attempts to put the given events into each configured channel. If any required channel throws a ChannelException, that exception will be propagated.

Note that if multiple channels are configured, some Transactions may have already been committed while others may be rolled back in the case of an exception.

Parameters:
events - A list of events to put into the configured channels.
Throws:
ChannelException - when a write to a required channel fails.

processEvent

public void processEvent(Event event)
Attempts to put the given event into each configured channel. If any required channel throws a ChannelException, that exception will be propagated.

Note that if multiple channels are configured, some Transactions may have already been committed while others may be rolled back in the case of an exception.

Parameters:
event - The event to put into the configured channels.
Throws:
ChannelException - when a write to a required channel fails.


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