|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.flume.channel.ChannelProcessor
public class ChannelProcessor
A channel processor exposes operations to put Event
s into
Channel
s. 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 | |
---|---|
void |
close()
|
void |
configure(Context context)
The Context of the associated Source is passed. |
ChannelSelector |
getSelector()
|
void |
initialize()
|
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 |
---|
public ChannelProcessor(ChannelSelector selector)
Method Detail |
---|
public void initialize()
public void close()
public void configure(Context context)
configure
in interface Configurable
context
- public ChannelSelector getSelector()
public void processEventBatch(List<Event> events)
required
channel throws a
ChannelException
, that exception will be propagated.
Note that if multiple channels are configured, some Transaction
s
may have already been committed while others may be rolled back in the
case of an exception.
events
- A list of events to put into the configured channels.
ChannelException
- when a write to a required channel fails.public void processEvent(Event event)
required
channel throws a
ChannelException
, that exception will be propagated.
Note that if multiple channels are configured, some Transaction
s
may have already been committed while others may be rolled back in the
case of an exception.
event
- The event to put into the configured channels.
ChannelException
- when a write to a required channel fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |