org.apache.flume
Interface PollableSource

All Superinterfaces:
LifecycleAware, NamedComponent, Source
All Known Implementing Classes:
AbstractPollableSource, JMSSource, SequenceGeneratorSource, StressSource

public interface PollableSource
extends Source

A Source that requires an external driver to poll to determine whether there are events that are available to ingest from the source.

See Also:
EventDrivenSourceRunner

Nested Class Summary
static class PollableSource.Status
           
 
Method Summary
 PollableSource.Status process()
           Attempt to pull an item from the source, sending it to the channel.
 
Methods inherited from interface org.apache.flume.Source
getChannelProcessor, setChannelProcessor
 
Methods inherited from interface org.apache.flume.lifecycle.LifecycleAware
getLifecycleState, start, stop
 
Methods inherited from interface org.apache.flume.NamedComponent
getName, setName
 

Method Detail

process

PollableSource.Status process()
                              throws EventDeliveryException

Attempt to pull an item from the source, sending it to the channel.

When driven by an EventDrivenSourceRunner process is guaranteed to be called only by a single thread at a time, with no concurrency. Any other mechanism driving a pollable source must follow the same semantics.

Returns:
READY if one or more events were created from the source. BACKOFF if no events could be created from the source.
Throws:
EventDeliveryException - If there was a failure in delivering to the attached channel, or if a failure occurred in acquiring data from the source.


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