org.apache.flume.thrift
Class ThriftFlumeEvent

java.lang.Object
  extended by org.apache.flume.thrift.ThriftFlumeEvent
All Implemented Interfaces:
Serializable, Cloneable, Comparable<ThriftFlumeEvent>, org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

public class ThriftFlumeEvent
extends Object
implements org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>, Serializable, Cloneable

See Also:
Serialized Form

Nested Class Summary
static class ThriftFlumeEvent._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 ByteBuffer body
           
 Map<String,String> headers
           
static Map<ThriftFlumeEvent._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
ThriftFlumeEvent()
           
ThriftFlumeEvent(Map<String,String> headers, ByteBuffer body)
           
ThriftFlumeEvent(ThriftFlumeEvent other)
          Performs a deep copy on other.
 
Method Summary
 ByteBuffer bufferForBody()
           
 void clear()
           
 int compareTo(ThriftFlumeEvent other)
           
 ThriftFlumeEvent deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(ThriftFlumeEvent that)
           
 ThriftFlumeEvent._Fields fieldForId(int fieldId)
           
 byte[] getBody()
           
 Object getFieldValue(ThriftFlumeEvent._Fields field)
           
 Map<String,String> getHeaders()
           
 int getHeadersSize()
           
 int hashCode()
           
 boolean isSet(ThriftFlumeEvent._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetBody()
          Returns true if field body is set (has been assigned a value) and false otherwise
 boolean isSetHeaders()
          Returns true if field headers is set (has been assigned a value) and false otherwise
 void putToHeaders(String key, String val)
           
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 ThriftFlumeEvent setBody(byte[] body)
           
 ThriftFlumeEvent setBody(ByteBuffer body)
           
 void setBodyIsSet(boolean value)
           
 void setFieldValue(ThriftFlumeEvent._Fields field, Object value)
           
 ThriftFlumeEvent setHeaders(Map<String,String> headers)
           
 void setHeadersIsSet(boolean value)
           
 String toString()
           
 void unsetBody()
           
 void unsetHeaders()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

headers

public Map<String,String> headers

body

public ByteBuffer body

metaDataMap

public static final Map<ThriftFlumeEvent._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

ThriftFlumeEvent

public ThriftFlumeEvent()

ThriftFlumeEvent

public ThriftFlumeEvent(Map<String,String> headers,
                        ByteBuffer body)

ThriftFlumeEvent

public ThriftFlumeEvent(ThriftFlumeEvent other)
Performs a deep copy on other.

Method Detail

deepCopy

public ThriftFlumeEvent deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

clear

public void clear()
Specified by:
clear in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

getHeadersSize

public int getHeadersSize()

putToHeaders

public void putToHeaders(String key,
                         String val)

getHeaders

public Map<String,String> getHeaders()

setHeaders

public ThriftFlumeEvent setHeaders(Map<String,String> headers)

unsetHeaders

public void unsetHeaders()

isSetHeaders

public boolean isSetHeaders()
Returns true if field headers is set (has been assigned a value) and false otherwise


setHeadersIsSet

public void setHeadersIsSet(boolean value)

getBody

public byte[] getBody()

bufferForBody

public ByteBuffer bufferForBody()

setBody

public ThriftFlumeEvent setBody(byte[] body)

setBody

public ThriftFlumeEvent setBody(ByteBuffer body)

unsetBody

public void unsetBody()

isSetBody

public boolean isSetBody()
Returns true if field body is set (has been assigned a value) and false otherwise


setBodyIsSet

public void setBodyIsSet(boolean value)

setFieldValue

public void setFieldValue(ThriftFlumeEvent._Fields field,
                          Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

getFieldValue

public Object getFieldValue(ThriftFlumeEvent._Fields field)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

isSet

public boolean isSet(ThriftFlumeEvent._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(ThriftFlumeEvent that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(ThriftFlumeEvent other)
Specified by:
compareTo in interface Comparable<ThriftFlumeEvent>

fieldForId

public ThriftFlumeEvent._Fields fieldForId(int fieldId)
Specified by:
fieldForId in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<ThriftFlumeEvent,ThriftFlumeEvent._Fields>
Throws:
org.apache.thrift.TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException


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