Class StatsUtil.StatEncoder

  • Enclosing class:
    StatsUtil

    public static class StatsUtil.StatEncoder
    extends Object
    • 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 destination
        data - is the source
        Returns:
        the destination tuple
      • 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