Class CodahaleOpStatsLogger

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) com.codahale.metrics.Timer fail  
      (package private) com.codahale.metrics.Timer success  
    • Constructor Summary

      Constructors 
      Constructor Description
      CodahaleOpStatsLogger​(com.codahale.metrics.Timer success, com.codahale.metrics.Timer fail)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear stats for this operation.
      void registerFailedEvent​(long eventLatency, java.util.concurrent.TimeUnit unit)
      Increment the failed op counter with the given eventLatency.
      void registerFailedValue​(long value)
      An operation with the given value failed.
      void registerSuccessfulEvent​(long eventLatency, java.util.concurrent.TimeUnit unit)
      An operation succeeded with the given eventLatency.
      void registerSuccessfulValue​(long value)
      An operation with the given value succeeded.
      OpStatsData toOpStatsData()
      This function should go away soon (hopefully).
      • Methods inherited from class java.lang.Object

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

      • success

        final com.codahale.metrics.Timer success
      • fail

        final com.codahale.metrics.Timer fail
    • Constructor Detail

      • CodahaleOpStatsLogger

        CodahaleOpStatsLogger​(com.codahale.metrics.Timer success,
                              com.codahale.metrics.Timer fail)
    • Method Detail

      • registerFailedEvent

        public void registerFailedEvent​(long eventLatency,
                                        java.util.concurrent.TimeUnit unit)
        Description copied from interface: OpStatsLogger
        Increment the failed op counter with the given eventLatency.
        Specified by:
        registerFailedEvent in interface OpStatsLogger
        Parameters:
        eventLatency - The event latency
      • registerSuccessfulEvent

        public void registerSuccessfulEvent​(long eventLatency,
                                            java.util.concurrent.TimeUnit unit)
        Description copied from interface: OpStatsLogger
        An operation succeeded with the given eventLatency. Update stats to reflect the same
        Specified by:
        registerSuccessfulEvent in interface OpStatsLogger
        Parameters:
        eventLatency - The event latency
      • registerFailedValue

        public void registerFailedValue​(long value)
        Description copied from interface: OpStatsLogger
        An operation with the given value failed.
        Specified by:
        registerFailedValue in interface OpStatsLogger
      • clear

        public void clear()
        Description copied from interface: OpStatsLogger
        Clear stats for this operation.
        Specified by:
        clear in interface OpStatsLogger
      • toOpStatsData

        public OpStatsData toOpStatsData()
        This function should go away soon (hopefully).
        Specified by:
        toOpStatsData in interface OpStatsLogger
        Returns:
        Returns an OpStatsData object with necessary values. We need this function to support JMX exports. This should be deprecated sometime in the near future. populated.