Class MessageTimerMonitor.Builder

java.lang.Object
org.axonframework.extension.metrics.dropwizard.MessageTimerMonitor.Builder
Enclosing class:
MessageTimerMonitor

public static class MessageTimerMonitor.Builder extends Object
Builder class to instantiate a MessageTimerMonitor.

The Clock is defaulted to a Clock.defaultClock() and the reservoirFactory defaults to creating a ExponentiallyDecayingReservoir.

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • clock

      public MessageTimerMonitor.Builder clock(com.codahale.metrics.Clock clock)
      Sets the Clock used to define the processing duration of a given message being pushed through this MessageMonitor. Defaults to the Clock.defaultClock().
      Parameters:
      clock - the Clock used to define the processing duration of a given message
      Returns:
      the current Builder instance, for fluent interfacing
    • reservoirFactory

      public MessageTimerMonitor.Builder reservoirFactory(Supplier<com.codahale.metrics.Reservoir> reservoirFactory)
      Sets factory method creating a Reservoir to be used by the Timer instances created by this MessageMonitor. Defaults to a Supplier of ExponentiallyDecayingReservoir.
      Parameters:
      reservoirFactory - a factory method creating a Reservoir to be used by the Timer instances created by this MessageMonitor
      Returns:
      the current Builder instance, for fluent interfacing
    • build

      public MessageTimerMonitor build()
      Initializes a MessageTimerMonitor as specified through this Builder.
      Returns:
      a MessageTimerMonitor as specified through this Builder
    • validate

      protected void validate()
      Validate whether the fields contained in this Builder as set accordingly.
      Throws:
      AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's specifications