Class MeasurementInvocationTracker
java.lang.Object
dk.cloudcreate.essentials.shared.reflection.invocation.MeasurementInvocationTracker
- All Implemented Interfaces:
InvocationTracker,LoggerAwareInvocationTracker
Simple
LoggerAwareInvocationTracker that uses MeasurementTaker to log
invocation performance to the log using default thresholds-
Nested Class Summary
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.shared.reflection.invocation.InvocationTracker
InvocationTracker.NoOpInvocationTracker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LogThresholdsOverride this method to provide a customLogThresholdsvoidsetLogger(org.slf4j.Logger logger) voidtrackMethodInvoked(Method method, Object invokeMethodsOn, Duration duration, Object argument) Track that the method had been invocation
-
Constructor Details
-
MeasurementInvocationTracker
public MeasurementInvocationTracker()
-
-
Method Details
-
trackMethodInvoked
public void trackMethodInvoked(Method method, Object invokeMethodsOn, Duration duration, Object argument) Description copied from interface:InvocationTrackerTrack that the method had been invocation- Specified by:
trackMethodInvokedin interfaceInvocationTracker- Parameters:
method- the invoked methodinvokeMethodsOn- The object where themethodwas invoked onduration- the duration of the invocationargument- the argument passed to the method
-
getLogThresholds
Override this method to provide a customLogThresholds- Returns:
- The
LogThresholdsto use for logging invocation metrics
-
setLogger
public void setLogger(org.slf4j.Logger logger) - Specified by:
setLoggerin interfaceLoggerAwareInvocationTracker
-