com.cloudera.flume.handlers.thrift
Class ThriftFlumeEvent

java.lang.Object
  extended by com.cloudera.flume.handlers.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,ByteBuffer> fields
           
 String host
           
static Map<ThriftFlumeEvent._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 long nanos
           
 Priority priority
           
 long timestamp
           
 
Constructor Summary
ThriftFlumeEvent()
           
ThriftFlumeEvent(long timestamp, Priority priority, ByteBuffer body, long nanos, String host, Map<String,ByteBuffer> fields)
           
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()
           
 Map<String,ByteBuffer> getFields()
           
 int getFieldsSize()
           
 Object getFieldValue(ThriftFlumeEvent._Fields field)
           
 String getHost()
           
 long getNanos()
           
 Priority getPriority()
           
 long getTimestamp()
           
 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 isSetFields()
          Returns true if field fields is set (has been assigned a value) and false otherwise
 boolean isSetHost()
          Returns true if field host is set (has been assigned a value) and false otherwise
 boolean isSetNanos()
          Returns true if field nanos is set (has been assigned a value) and false otherwise
 boolean isSetPriority()
          Returns true if field priority is set (has been assigned a value) and false otherwise
 boolean isSetTimestamp()
          Returns true if field timestamp is set (has been assigned a value) and false otherwise
 void putToFields(String key, ByteBuffer val)
           
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 ThriftFlumeEvent setBody(byte[] body)
           
 ThriftFlumeEvent setBody(ByteBuffer body)
           
 void setBodyIsSet(boolean value)
           
 ThriftFlumeEvent setFields(Map<String,ByteBuffer> fields)
           
 void setFieldsIsSet(boolean value)
           
 void setFieldValue(ThriftFlumeEvent._Fields field, Object value)
           
 ThriftFlumeEvent setHost(String host)
           
 void setHostIsSet(boolean value)
           
 ThriftFlumeEvent setNanos(long nanos)
           
 void setNanosIsSet(boolean value)
           
 ThriftFlumeEvent setPriority(Priority priority)
           
 void setPriorityIsSet(boolean value)
           
 ThriftFlumeEvent setTimestamp(long timestamp)
           
 void setTimestampIsSet(boolean value)
           
 String toString()
           
 void unsetBody()
           
 void unsetFields()
           
 void unsetHost()
           
 void unsetNanos()
           
 void unsetPriority()
           
 void unsetTimestamp()
           
 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

timestamp

public long timestamp

priority

public Priority priority
See Also:
Priority

body

public ByteBuffer body

nanos

public long nanos

host

public String host

fields

public Map<String,ByteBuffer> fields

metaDataMap

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

ThriftFlumeEvent

public ThriftFlumeEvent()

ThriftFlumeEvent

public ThriftFlumeEvent(long timestamp,
                        Priority priority,
                        ByteBuffer body,
                        long nanos,
                        String host,
                        Map<String,ByteBuffer> fields)

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>

getTimestamp

public long getTimestamp()

setTimestamp

public ThriftFlumeEvent setTimestamp(long timestamp)

unsetTimestamp

public void unsetTimestamp()

isSetTimestamp

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


setTimestampIsSet

public void setTimestampIsSet(boolean value)

getPriority

public Priority getPriority()
See Also:
Priority

setPriority

public ThriftFlumeEvent setPriority(Priority priority)
See Also:
Priority

unsetPriority

public void unsetPriority()

isSetPriority

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


setPriorityIsSet

public void setPriorityIsSet(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)

getNanos

public long getNanos()

setNanos

public ThriftFlumeEvent setNanos(long nanos)

unsetNanos

public void unsetNanos()

isSetNanos

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


setNanosIsSet

public void setNanosIsSet(boolean value)

getHost

public String getHost()

setHost

public ThriftFlumeEvent setHost(String host)

unsetHost

public void unsetHost()

isSetHost

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


setHostIsSet

public void setHostIsSet(boolean value)

getFieldsSize

public int getFieldsSize()

putToFields

public void putToFields(String key,
                        ByteBuffer val)

getFields

public Map<String,ByteBuffer> getFields()

setFields

public ThriftFlumeEvent setFields(Map<String,ByteBuffer> fields)

unsetFields

public void unsetFields()

isSetFields

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


setFieldsIsSet

public void setFieldsIsSet(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-2015 Apache Software Foundation. All Rights Reserved.