java.lang.Object
dk.cloudcreate.essentials.shared.reflection.invocation.MeasurementInvocationTracker
All Implemented Interfaces:
InvocationTracker, LoggerAwareInvocationTracker

public class MeasurementInvocationTracker extends Object implements LoggerAwareInvocationTracker
Simple LoggerAwareInvocationTracker that uses MeasurementTaker to log invocation performance to the log using default thresholds
  • Constructor Details

    • MeasurementInvocationTracker

      public MeasurementInvocationTracker()
  • Method Details

    • trackMethodInvoked

      public void trackMethodInvoked(Method method, Object invokeMethodsOn, Duration duration, Object argument)
      Description copied from interface: InvocationTracker
      Track that the method had been invocation
      Specified by:
      trackMethodInvoked in interface InvocationTracker
      Parameters:
      method - the invoked method
      invokeMethodsOn - The object where the method was invoked on
      duration - the duration of the invocation
      argument - the argument passed to the method
    • getLogThresholds

      protected LogThresholds getLogThresholds()
      Override this method to provide a custom LogThresholds
      Returns:
      The LogThresholds to use for logging invocation metrics
    • setLogger

      public void setLogger(org.slf4j.Logger logger)
      Specified by:
      setLogger in interface LoggerAwareInvocationTracker