Class LatencyTrackerComputation

    • Field Detail

      • logNames

        protected final List<Name> logNames
      • intervalMs

        protected final int intervalMs
      • count

        protected final int count
      • verbose

        protected final boolean verbose
      • remaining

        protected int remaining
      • refreshGroupCounter

        protected int refreshGroupCounter
    • Constructor Detail

      • LatencyTrackerComputation

        public LatencyTrackerComputation​(LogManager manager,
                                         List<Name> logNames,
                                         String computationName,
                                         int intervalSecond,
                                         int count,
                                         boolean verbose,
                                         Codec<Record> codec,
                                         int outputStream)
    • Method Detail

      • init

        public void init​(ComputationContext context)
        Description copied from interface: Computation
        Called when the framework has registered the computation successfully. Gives users a first opportunity to schedule timer callbacks and produce records. This method can be called multiple times.
        Specified by:
        init in interface Computation
        Overrides:
        init in class AbstractComputation
        Parameters:
        context - The computation context object provided by the system.
      • refreshGroup

        protected boolean refreshGroup()
      • encodeLatency

        protected byte[] encodeLatency​(Latency latency)
      • destroy

        public void destroy()
        Description copied from interface: Computation
        Called when the framework is ready to shutdown the computation. Gives users a chance to perform some cleanup before the process is killed.
      • processRecord

        public void processRecord​(ComputationContext context,
                                  String inputStreamName,
                                  Record record)
        Description copied from interface: Computation
        Process an incoming record on one of the computation's input streams.
        Parameters:
        context - The computation context object provided by the system.
        inputStreamName - Name of the input stream that provides the record.
        record - The record.