Class MessageTimerMonitor
java.lang.Object
org.axonframework.extension.metrics.dropwizard.MessageTimerMonitor
- All Implemented Interfaces:
com.codahale.metrics.Metric,com.codahale.metrics.MetricSet,MessageMonitor<Message>
public class MessageTimerMonitor
extends Object
implements MessageMonitor<Message>, com.codahale.metrics.MetricSet
A
MessageMonitor which creates Timer instances for the overall, success, failure and ignored time an
ingested Message takes.- Since:
- 3.0
- Author:
- Marijn van Zelst
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aMessageTimerMonitor.Nested classes/interfaces inherited from interface org.axonframework.messaging.monitoring.MessageMonitor
MessageMonitor.MonitorCallback -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstantiate aMessageTimerMonitorbased on the fields contained in theMessageTimerMonitor.Builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTimerMonitor.Builderbuilder()Instantiate a Builder to be able to create aMessageTimerMonitor.onMessageIngested(Message message) Takes a message and returns a callback that should be used to inform the message monitor about the result of processing the messageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.messaging.monitoring.MessageMonitor
onMessagesIngested
-
Constructor Details
-
MessageTimerMonitor
Instantiate aMessageTimerMonitorbased on the fields contained in theMessageTimerMonitor.Builder.- Parameters:
builder- theMessageTimerMonitor.Builderused to instantiate aMessageTimerMonitorinstance
-
-
Method Details
-
builder
Instantiate a Builder to be able to create aMessageTimerMonitor.The
Clockis defaulted to aClock.defaultClock()and thereservoirFactorydefaults to creating aExponentiallyDecayingReservoir.- Returns:
- a Builder to be able to create a
MessageTimerMonitor
-
onMessageIngested
Description copied from interface:MessageMonitorTakes a message and returns a callback that should be used to inform the message monitor about the result of processing the message- Specified by:
onMessageIngestedin interfaceMessageMonitor<Message>- Parameters:
message- the message to monitor- Returns:
- the callback
-
getMetrics
- Specified by:
getMetricsin interfacecom.codahale.metrics.MetricSet
-