|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.reservoir.monitoring.distribution.MeasurementEncoder
public class MeasurementEncoder
Convert a measurement to a byte array.
Constructor Summary | |
---|---|
MeasurementEncoder(Measurement m)
Construct a MeasurementEncoder for a Measurement. |
Method Summary | |
---|---|
void |
encode(java.io.DataOutput out)
Encode the Measurement to a DataOutput object. |
protected void |
encodeType(ProbeAttributeType type)
Encode a type |
protected void |
encodeValue(java.lang.Object value,
ProbeAttributeType type)
Encode a value of a given type |
protected void |
writeInt(java.lang.Object value)
Write an integer to the output. |
protected void |
writeList(java.lang.Object value)
Write a list to the output. |
protected void |
writeTable(java.lang.Object value)
Write a table to the output. |
protected void |
writeUTF(java.lang.Object value)
Write a UTF string to the output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeasurementEncoder(Measurement m)
Method Detail |
---|
public void encode(java.io.DataOutput out) throws java.io.IOException, TypeException
+------------------------------------------------------------------------+ | seq no (long) | options (byte) [bit 0 : 0 = no names / 1 = with names] | +------------------------------------------------------------------------+ | probe id (long) | type (utf string) | timestamp (long) | +------------------------------------------------------------------------+ | time delta (long) | service id (long) | group id (long) | attr count | +------------------------------------------------------------------------+ | attr0 field no (int) | attr0 type (byte) | attr0 value (depends) | +------------------------------------------------------------------------+ | .... | +------------------------------------------------------------------------+ | attrN field no (int) | attrN type (byte) | attrN value (depends) | +------------------------------------------------------------------------+
java.io.IOException
TypeException
protected void encodeType(ProbeAttributeType type) throws java.io.IOException
java.io.IOException
protected void encodeValue(java.lang.Object value, ProbeAttributeType type) throws java.io.IOException
java.io.IOException
protected void writeInt(java.lang.Object value) throws java.io.IOException
java.io.IOException
protected void writeUTF(java.lang.Object value) throws java.io.IOException
java.io.IOException
protected void writeTable(java.lang.Object value) throws java.io.IOException
java.io.IOException
protected void writeList(java.lang.Object value) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |