Class StatsUtil.StatEncoder

java.lang.Object
com.streambase.sb.monitor.StatsUtil.StatEncoder
Enclosing class:
com.streambase.sb.monitor.StatsUtil

public static class StatsUtil.StatEncoder extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.streambase.sb.monitor.KeyRegistry
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StatEncoder(StatsUtil.What what, com.streambase.sb.monitor.KeyRegistry keys)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    marshal(Tuple t, com.streambase.sb.monitor.StatTuplev3 data)
    Put data in StatBuffer into the tuple; after marshaling, the stat buffer is recycled.
    com.streambase.sb.monitor.StatTuplev3
    Get a tuple from cache.
    com.streambase.sb.monitor.StatTuplev3
    newStatTuple(int cycle, long time)
     
    void
    recycle(com.streambase.sb.monitor.StatTuplev3 data)
     
    com.streambase.sb.monitor.StatTuplev3
    Retrieve data from tuple and returns a StatBuffer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • keys

      protected com.streambase.sb.monitor.KeyRegistry keys
  • Constructor Details

    • StatEncoder

      public StatEncoder(StatsUtil.What what, com.streambase.sb.monitor.KeyRegistry keys)
  • Method Details

    • marshal

      public Tuple marshal(Tuple t, com.streambase.sb.monitor.StatTuplev3 data)
      Put data in StatBuffer into the tuple; after marshaling, the stat buffer is recycled.
      Parameters:
      t - is the destination
      data - is the source
      Returns:
      the destination tuple
    • unmarshal

      public com.streambase.sb.monitor.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 com.streambase.sb.monitor.StatTuplev3 newStatTuple(int cycle, long time)
    • newStatTuple

      public com.streambase.sb.monitor.StatTuplev3 newStatTuple()
      Get a tuple from cache. It should be thread-safe
      Returns:
      a statistics tuple
    • recycle

      public void recycle(com.streambase.sb.monitor.StatTuplev3 data)