Class EventMetric


  • public class EventMetric
    extends java.lang.Object
    Metric measurements for events.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventMetric​(MetricsService metricsService, java.lang.String componentName, java.lang.String featureName)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.codahale.metrics.Meter eventRateMeter()
      Gets the event rate meter.
      void eventReceived()
      Updates the metric measurements for a single event.
      com.codahale.metrics.Gauge<java.lang.Long> lastEventTimestampGauge()
      Gets the last event timestamp Gauge (ms from the Epoch).
      void registerMetrics()
      Registers the metrics.
      void removeMetrics()
      Removes the metrics.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventMetric

        public EventMetric​(MetricsService metricsService,
                           java.lang.String componentName,
                           java.lang.String featureName)
        Constructor.
        Parameters:
        metricsService - the Metrics Service to use for Metrics registration and deregistration
        componentName - the Metrics Component Name to use for Metrics registration and deregistration
        featureName - the Metrics Feature Name to use for Metrics registration and deregistration
    • Method Detail

      • registerMetrics

        public void registerMetrics()
        Registers the metrics.
      • removeMetrics

        public void removeMetrics()
        Removes the metrics.
      • eventReceived

        public void eventReceived()
        Updates the metric measurements for a single event.
      • lastEventTimestampGauge

        public com.codahale.metrics.Gauge<java.lang.Long> lastEventTimestampGauge()
        Gets the last event timestamp Gauge (ms from the Epoch).
        Returns:
        the last event timestamp Gauge (ms from the Epoch)
      • eventRateMeter

        public com.codahale.metrics.Meter eventRateMeter()
        Gets the event rate meter.
        Returns:
        the event rate meter