Package com.streambase.sb.monitor
Class StatsUtil.StatEncoder
- java.lang.Object
-
- com.streambase.sb.monitor.StatsUtil.StatEncoder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
StatsUtil.StatEncoder.KeyType
-
Field Summary
Fields Modifier and Type Field Description protected com.streambase.sb.monitor.KeyRegistry
keys
-
Constructor Summary
Constructors Constructor Description StatEncoder(StatsUtil.What what, com.streambase.sb.monitor.KeyRegistry keys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tuple
marshal(Tuple t, StatTuplev3 data)
Put data in StatBuffer into the tuple; after marshaling, the stat buffer is recycled.StatTuplev3
newStatTuple()
Get a tuple from cache.StatTuplev3
newStatTuple(int cycle, long time)
void
recycle(StatTuplev3 data)
StatTuplev3
unmarshal(Tuple t)
Retrieve data from tuple and returns a StatBuffer
-
-
-
Field Detail
-
keys
protected com.streambase.sb.monitor.KeyRegistry keys
-
-
Constructor Detail
-
StatEncoder
public StatEncoder(StatsUtil.What what, com.streambase.sb.monitor.KeyRegistry keys)
-
-
Method Detail
-
marshal
public Tuple marshal(Tuple t, StatTuplev3 data)
Put data in StatBuffer into the tuple; after marshaling, the stat buffer is recycled.- Parameters:
t
- is the destinationdata
- is the source- Returns:
- the destination tuple
-
unmarshal
public StatTuplev3 unmarshal(Tuple t) throws NullValueException, TupleException
Retrieve data from tuple and returns a StatBuffer- Parameters:
t
-- Returns:
- a statistics tuple
- Throws:
TupleException
NullValueException
-
newStatTuple
public StatTuplev3 newStatTuple(int cycle, long time)
-
newStatTuple
public StatTuplev3 newStatTuple()
Get a tuple from cache. It should be thread-safe- Returns:
- a statistics tuple
-
recycle
public void recycle(StatTuplev3 data)
-
-