org.apache.flume.channel.recoverable.memory.wal
Class WALEntry<T extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by org.apache.flume.channel.recoverable.memory.wal.WALEntry<T>
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class WALEntry<T extends org.apache.hadoop.io.Writable>
extends Object
implements org.apache.hadoop.io.Writable

Wraps a Writable with a sequence id so that both can be written together to a file.


Constructor Summary
WALEntry(T data, long sequenceID)
          Creates a WALEntry with specified payload and sequence id
 
Method Summary
 T getData()
           
 long getSequenceID()
           
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WALEntry

public WALEntry(T data,
                long sequenceID)
Creates a WALEntry with specified payload and sequence id

Parameters:
data -
sequenceID -
Method Detail

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

getData

public T getData()

getSequenceID

public long getSequenceID()


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