|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.flume.channel.AbstractChannel
org.apache.flume.channel.file.FileChannel
public class FileChannel
A durable Channel implementation that uses the local file system for
its storage.
| Nested Class Summary | |
|---|---|
static class |
FileChannel.FileBackedTransaction
An implementation of Transaction for FileChannels. |
| Constructor Summary | |
|---|---|
FileChannel()
|
|
| Method Summary | |
|---|---|
File |
getCompleteDirectory()
|
File |
getDirectory()
|
String |
getName()
|
File |
getOpenDirectory()
|
Transaction |
getTransaction()
|
boolean |
isInitialized()
|
void |
put(Event event)
Puts the given event into the channel. |
void |
setDirectory(File directory)
|
Event |
take()
Returns the next event from the channel if available. |
| Methods inherited from class org.apache.flume.channel.AbstractChannel |
|---|
configure, getLifecycleState, setName, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileChannel()
| Method Detail |
|---|
public void put(Event event)
throws ChannelException
ChannelPuts the given event into the channel.
Note: This method must be invoked within an active
Transaction boundary. Failure to do so can lead to unpredictable
results.
event - the event to transport.
ChannelException - in case this operation fails.Transaction.begin()
public Event take()
throws ChannelException
ChannelReturns the next event from the channel if available. If the channel
does not have any events available, this method must return null.
Note: This method must be invoked within an active
Transaction boundary. Failure to do so can lead to unpredictable
results.
null if no events are
available.
ChannelException - in case this operation fails.Transaction.begin()public Transaction getTransaction()
public File getDirectory()
public void setDirectory(File directory)
public File getOpenDirectory()
public File getCompleteDirectory()
public boolean isInitialized()
public String getName()
getName in interface NamedComponentgetName in class AbstractChannel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||