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

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

public class PersistableEvent
extends Object
implements Event


Nested Class Summary
static class PersistableEvent.Builder
           
protected static class PersistableEvent.HeaderEntry
           
protected static class PersistableEvent.SpillableString
           
 
Constructor Summary
PersistableEvent(String channel, Event event)
           
 
Method Summary
 byte[] getBasePayload()
           
 byte[] getBody()
          Returns the raw byte array of the data contained in this event.
 String getChannelName()
           
protected  long getEventId()
           
 List<PersistableEvent.HeaderEntry> getHeaderEntries()
           
 Map<String,String> getHeaders()
          Returns a map of name-value pairs describing the data stored in the body.
 byte[] getSpillPayload()
           
 void setBody(byte[] body)
          Sets the raw byte array of the data contained in this event.
protected  void setEventId(long eventId)
           
 void setHeaders(Map<String,String> headers)
          Set the event headers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistableEvent

public PersistableEvent(String channel,
                        Event event)
Method Detail

getChannelName

public String getChannelName()

getBasePayload

public byte[] getBasePayload()

getSpillPayload

public byte[] getSpillPayload()

setEventId

protected void setEventId(long eventId)

getEventId

protected long getEventId()

getHeaderEntries

public List<PersistableEvent.HeaderEntry> getHeaderEntries()

setHeaders

public void setHeaders(Map<String,String> headers)
Description copied from interface: Event
Set the event headers

Specified by:
setHeaders in interface Event
Parameters:
headers - Map of headers to replace the current headers.

getBody

public byte[] getBody()
Description copied from interface: Event
Returns the raw byte array of the data contained in this event.

Specified by:
getBody in interface Event

setBody

public void setBody(byte[] body)
Description copied from interface: Event
Sets the raw byte array of the data contained in this event.

Specified by:
setBody in interface Event
Parameters:
body - The data.

getHeaders

public Map<String,String> getHeaders()
Description copied from interface: Event
Returns a map of name-value pairs describing the data stored in the body.

Specified by:
getHeaders in interface Event


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