org.apache.flume.channel.jdbc.impl
Class JdbcChannelProviderImpl

java.lang.Object
  extended by org.apache.flume.channel.jdbc.impl.JdbcChannelProviderImpl
All Implemented Interfaces:
JdbcChannelProvider

public class JdbcChannelProviderImpl
extends Object
implements JdbcChannelProvider


Constructor Summary
JdbcChannelProviderImpl()
           
 
Method Summary
 void close()
          Deinitializes the channel provider.
 JdbcTransactionImpl getTransaction()
           
 void initialize(Context context)
          Initializes the channel provider.
 void persistEvent(String channel, Event event)
          Writes the event to the persistent store.
 Event removeEvent(String channelName)
          Removes the next event for the named channel from the underlying persistent store.
protected  void updateCurrentChannelSize(long delta)
          A callback method invoked from individual transaction instances after a successful commit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcChannelProviderImpl

public JdbcChannelProviderImpl()
Method Detail

initialize

public void initialize(Context context)
Description copied from interface: JdbcChannelProvider
Initializes the channel provider. This method must be called before the channel can be used in any way.

Specified by:
initialize in interface JdbcChannelProvider

close

public void close()
Description copied from interface: JdbcChannelProvider
Deinitializes the channel provider. Once this method is called, the channel provider cannot be used and must be discarded.

Specified by:
close in interface JdbcChannelProvider

persistEvent

public void persistEvent(String channel,
                         Event event)
Description copied from interface: JdbcChannelProvider
Writes the event to the persistent store.

Specified by:
persistEvent in interface JdbcChannelProvider

removeEvent

public Event removeEvent(String channelName)
Description copied from interface: JdbcChannelProvider
Removes the next event for the named channel from the underlying persistent store.

Specified by:
removeEvent in interface JdbcChannelProvider
Returns:

getTransaction

public JdbcTransactionImpl getTransaction()
Specified by:
getTransaction in interface JdbcChannelProvider
Returns:
the transaction associated with the current thread.

updateCurrentChannelSize

protected void updateCurrentChannelSize(long delta)
A callback method invoked from individual transaction instances after a successful commit. The argument passed is the net number of events to be added to the current size as tracked by the provider.

Parameters:
delta - the net number of events to be added to reflect the current size of the channel


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