org.apache.blur.thrift.generated
Class Metric

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

public class Metric
extends Object
implements TBase<Metric,Metric._Fields>, Serializable, Cloneable

The Metric will hold all the information for a given Metric.

See Also:
Serialized Form

Nested Class Summary
static class Metric._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 Map<String,Double> doubleMap
          map of double values emitted by the Metric.
 Map<String,Long> longMap
          map of long values emitted by the Metric.
static Map<Metric._Fields,FieldMetaData> metaDataMap
           
 String name
          metric name.
 Map<String,String> strMap
          map of string values emitted by the Metric.
 
Constructor Summary
Metric()
           
Metric(Metric other)
          Performs a deep copy on other.
Metric(String name, Map<String,String> strMap, Map<String,Long> longMap, Map<String,Double> doubleMap)
           
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(Metric other)
           
 Metric deepCopy()
           
 boolean equals(Metric that)
           
 boolean equals(Object that)
           
 Metric._Fields fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 Map<String,Double> getDoubleMap()
          map of double values emitted by the Metric.
 int getDoubleMapSize()
           
 Object getFieldValue(Metric._Fields field)
          Get a field's value by field variable.
 Map<String,Long> getLongMap()
          map of long values emitted by the Metric.
 int getLongMapSize()
           
 String getName()
          metric name.
 Map<String,String> getStrMap()
          map of string values emitted by the Metric.
 int getStrMapSize()
           
 int hashCode()
           
 boolean isSet(Metric._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetDoubleMap()
          Returns true if field doubleMap is set (has been assigned a value) and false otherwise
 boolean isSetLongMap()
          Returns true if field longMap is set (has been assigned a value) and false otherwise
 boolean isSetName()
          Returns true if field name is set (has been assigned a value) and false otherwise
 boolean isSetStrMap()
          Returns true if field strMap is set (has been assigned a value) and false otherwise
 void putToDoubleMap(String key, double val)
           
 void putToLongMap(String key, long val)
           
 void putToStrMap(String key, String val)
           
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 Metric setDoubleMap(Map<String,Double> doubleMap)
          map of double values emitted by the Metric.
 void setDoubleMapIsSet(boolean value)
           
 void setFieldValue(Metric._Fields field, Object value)
          Set a field's value by field variable.
 Metric setLongMap(Map<String,Long> longMap)
          map of long values emitted by the Metric.
 void setLongMapIsSet(boolean value)
           
 Metric setName(String name)
          metric name.
 void setNameIsSet(boolean value)
           
 Metric setStrMap(Map<String,String> strMap)
          map of string values emitted by the Metric.
 void setStrMapIsSet(boolean value)
           
 String toString()
           
 void unsetDoubleMap()
           
 void unsetLongMap()
           
 void unsetName()
           
 void unsetStrMap()
           
 void validate()
           
 void write(TProtocol oprot)
          Writes the objects out to the protocol
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public String name
metric name.


strMap

public Map<String,String> strMap
map of string values emitted by the Metric.


longMap

public Map<String,Long> longMap
map of long values emitted by the Metric.


doubleMap

public Map<String,Double> doubleMap
map of double values emitted by the Metric.


metaDataMap

public static final Map<Metric._Fields,FieldMetaData> metaDataMap
Constructor Detail

Metric

public Metric()

Metric

public Metric(String name,
              Map<String,String> strMap,
              Map<String,Long> longMap,
              Map<String,Double> doubleMap)

Metric

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

Method Detail

deepCopy

public Metric deepCopy()
Specified by:
deepCopy in interface TBase<Metric,Metric._Fields>

clear

public void clear()
Description copied from interface: TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface TBase<Metric,Metric._Fields>

getName

public String getName()
metric name.


setName

public Metric setName(String name)
metric name.


unsetName

public void unsetName()

isSetName

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


setNameIsSet

public void setNameIsSet(boolean value)

getStrMapSize

public int getStrMapSize()

putToStrMap

public void putToStrMap(String key,
                        String val)

getStrMap

public Map<String,String> getStrMap()
map of string values emitted by the Metric.


setStrMap

public Metric setStrMap(Map<String,String> strMap)
map of string values emitted by the Metric.


unsetStrMap

public void unsetStrMap()

isSetStrMap

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


setStrMapIsSet

public void setStrMapIsSet(boolean value)

getLongMapSize

public int getLongMapSize()

putToLongMap

public void putToLongMap(String key,
                         long val)

getLongMap

public Map<String,Long> getLongMap()
map of long values emitted by the Metric.


setLongMap

public Metric setLongMap(Map<String,Long> longMap)
map of long values emitted by the Metric.


unsetLongMap

public void unsetLongMap()

isSetLongMap

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


setLongMapIsSet

public void setLongMapIsSet(boolean value)

getDoubleMapSize

public int getDoubleMapSize()

putToDoubleMap

public void putToDoubleMap(String key,
                           double val)

getDoubleMap

public Map<String,Double> getDoubleMap()
map of double values emitted by the Metric.


setDoubleMap

public Metric setDoubleMap(Map<String,Double> doubleMap)
map of double values emitted by the Metric.


unsetDoubleMap

public void unsetDoubleMap()

isSetDoubleMap

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


setDoubleMapIsSet

public void setDoubleMapIsSet(boolean value)

setFieldValue

public void setFieldValue(Metric._Fields field,
                          Object value)
Description copied from interface: TBase
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Specified by:
setFieldValue in interface TBase<Metric,Metric._Fields>

getFieldValue

public Object getFieldValue(Metric._Fields field)
Description copied from interface: TBase
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Specified by:
getFieldValue in interface TBase<Metric,Metric._Fields>

isSet

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

Specified by:
isSet in interface TBase<Metric,Metric._Fields>

equals

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

equals

public boolean equals(Metric that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

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

fieldForId

public Metric._Fields fieldForId(int fieldId)
Description copied from interface: TBase
Get the F instance that corresponds to fieldId.

Specified by:
fieldForId in interface TBase<Metric,Metric._Fields>

read

public void read(TProtocol iprot)
          throws TException
Description copied from interface: TBase
Reads the TObject from the given input protocol.

Specified by:
read in interface TBase<Metric,Metric._Fields>
Parameters:
iprot - Input protocol
Throws:
TException

write

public void write(TProtocol oprot)
           throws TException
Description copied from interface: TBase
Writes the objects out to the protocol

Specified by:
write in interface TBase<Metric,Metric._Fields>
Parameters:
oprot - Output protocol
Throws:
TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws TException
Throws:
TException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.