|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.FudgeSize
public class FudgeSize
Utility for calculating the size of a Fudge message.
These utilities calculate the size of a stream without constructing a full message.
This class is a static utility with no shared state.
Constructor Summary | |
---|---|
FudgeSize()
|
Method Summary | ||
---|---|---|
static
|
calculateFieldSize(FudgeField field)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes when no taxonomy is used. |
|
static
|
calculateFieldSize(FudgeFieldType<T> type,
T value)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes when no taxonomy is used. |
|
static
|
calculateFieldSize(FudgeTaxonomy taxonomy,
FudgeField field)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes. |
|
static
|
calculateFieldSize(FudgeTaxonomy taxonomy,
Short ordinal,
String name,
FudgeFieldType<T> type,
T value)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes. |
|
static
|
calculateFieldSize(Short ordinal,
FudgeFieldType<T> type,
T value)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes when no taxonomy is used. |
|
static
|
calculateFieldSize(Short ordinal,
String name,
FudgeFieldType<T> type,
T value)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes when no taxonomy is used. |
|
static
|
calculateFieldSize(String name,
FudgeFieldType<T> type,
T value)
Calculates the size of a field (field header and value payload) in the Fudge stream in bytes when no taxonomy is used. |
|
static int |
calculateMessageEnvelopeSize(FudgeFieldContainer fields)
Calculates the size of a message including the envelope header when no taxonomy is used. |
|
static int |
calculateMessageEnvelopeSize(FudgeMsgEnvelope envelope)
Calculates the size of a message including the envelope header when no taxonomy is used. |
|
static int |
calculateMessageEnvelopeSize(FudgeTaxonomy taxonomy,
FudgeFieldContainer fields)
Calculates the size of a message including the envelope header. |
|
static int |
calculateMessageEnvelopeSize(FudgeTaxonomy taxonomy,
FudgeMsgEnvelope envelope)
Calculates the size of a message including the envelope header. |
|
static int |
calculateMessageSize(FudgeFieldContainer fields)
Calculates the size of a message as the sum of the fields when no taxonomy is used. |
|
static int |
calculateMessageSize(FudgeTaxonomy taxonomy,
FudgeFieldContainer fields)
Calculates the size of a message as the sum of the fields. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FudgeSize()
Method Detail |
---|
public static <T> int calculateFieldSize(FudgeTaxonomy taxonomy, Short ordinal, String name, FudgeFieldType<T> type, T value)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field datataxonomy
- the taxonomy in use, null if no taxonomyordinal
- the field ordinal, null if no ordinalname
- the field name, null if no nametype
- the Fudge field type, not nullvalue
- the field value
public static <T> int calculateFieldSize(FudgeTaxonomy taxonomy, FudgeField field)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field datataxonomy
- the taxonomy in use, null if no taxonomyfield
- the field to calculate a size for, not null
public static <T> int calculateFieldSize(FudgeField field)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field datafield
- the field to calculate a size for, not null
public static <T> int calculateFieldSize(Short ordinal, String name, FudgeFieldType<T> type, T value)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field dataordinal
- the field ordinal, null if no ordinalname
- the field name, null if no nametype
- the Fudge field type, not nullvalue
- the field value
public static <T> int calculateFieldSize(Short ordinal, FudgeFieldType<T> type, T value)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field dataordinal
- the field ordinal, null if no ordinaltype
- the Fudge field type, not nullvalue
- the field value
public static <T> int calculateFieldSize(String name, FudgeFieldType<T> type, T value)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field dataname
- the field name, null if no nametype
- the Fudge field type, not nullvalue
- the field value
public static <T> int calculateFieldSize(FudgeFieldType<T> type, T value)
The calculation takes account of the value being reduced to fit in a smaller space.
T
- the underlying Java type of the field datatype
- the Fudge field type, not nullvalue
- the field value
public static int calculateMessageSize(FudgeTaxonomy taxonomy, FudgeFieldContainer fields)
taxonomy
- the taxonomy in use, null if no taxonomyfields
- the fields to calculate a size for, not null
public static int calculateMessageSize(FudgeFieldContainer fields)
fields
- the fields to calculate a size for, not null
public static int calculateMessageEnvelopeSize(FudgeTaxonomy taxonomy, FudgeFieldContainer fields)
taxonomy
- the taxonomy in use, null if no taxonomyfields
- the fields to calculate a size for, not null
public static int calculateMessageEnvelopeSize(FudgeFieldContainer fields)
fields
- the fields to calculate a size for, not null
public static int calculateMessageEnvelopeSize(FudgeTaxonomy taxonomy, FudgeMsgEnvelope envelope)
taxonomy
- the taxonomy in use, null if no taxonomyenvelope
- the message envelope to calculate a size for, not null
public static int calculateMessageEnvelopeSize(FudgeMsgEnvelope envelope)
envelope
- the message envelope to calculate a size for, not null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |