org.apache.flume.sink
Class AbstractSink

java.lang.Object
  extended by org.apache.flume.sink.AbstractSink
All Implemented Interfaces:
LifecycleAware, NamedComponent, Sink
Direct Known Subclasses:
AbstractRpcSink, AsyncHBaseSink, ElasticSearchSink, HBaseSink, HDFSEventSink, IRCSink, LoggerSink, MorphlineSink, NullSink, RollingFileSink

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class AbstractSink
extends Object
implements Sink, LifecycleAware


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.flume.Sink
Sink.Status
 
Constructor Summary
AbstractSink()
           
 
Method Summary
 Channel getChannel()
           
 LifecycleState getLifecycleState()
           Return the current state of the service or component.
 String getName()
           
 void setChannel(Channel channel)
          Sets the channel the sink will consume from
 void setName(String name)
           
 void start()
           Starts a service or component.
 void stop()
           Stops a service or component.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.flume.Sink
process
 

Constructor Detail

AbstractSink

public AbstractSink()
Method Detail

start

public void start()
Description copied from interface: LifecycleAware

Starts a service or component.

Implementations should determine the result of any start logic and effect the return value of LifecycleAware.getLifecycleState() accordingly.

Specified by:
start in interface LifecycleAware

stop

public void stop()
Description copied from interface: LifecycleAware

Stops a service or component.

Implementations should determine the result of any stop logic and effect the return value of LifecycleAware.getLifecycleState() accordingly.

Specified by:
stop in interface LifecycleAware

getChannel

public Channel getChannel()
Specified by:
getChannel in interface Sink
Returns:
the channel associated with this sink

setChannel

public void setChannel(Channel channel)
Description copied from interface: Sink

Sets the channel the sink will consume from

Specified by:
setChannel in interface Sink
Parameters:
channel - The channel to be polled

getLifecycleState

public LifecycleState getLifecycleState()
Description copied from interface: LifecycleAware

Return the current state of the service or component.

Specified by:
getLifecycleState in interface LifecycleAware

setName

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

getName

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

toString

public String toString()
Overrides:
toString in class Object


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