public static class EventProcessorLatencyMonitor.Builder extends Object
EventProcessorLatencyMonitor.
The tagsBuilder is defaulted to a Function returning Tags.empty() and the Clock
to a a Clock.SYSTEM. The meterNamePrefix and MeterRegistry are hard requirements
and as such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
EventProcessorLatencyMonitor |
build()
Initializes a
MessageTimerMonitor as specified through this Builder. |
EventProcessorLatencyMonitor.Builder |
clock(io.micrometer.core.instrument.Clock clock)
Sets the
Clock used to define the processing duration of a given message being pushed through this
MessageMonitor. |
EventProcessorLatencyMonitor.Builder |
meterNamePrefix(String meterNamePrefix)
Sets the name used to prefix the names of the
Gauge instances created by this
MessageMonitor. |
EventProcessorLatencyMonitor.Builder |
meterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Specifies the
MeterRegistry used to registered the Gauge instances to. |
EventProcessorLatencyMonitor.Builder |
tagsBuilder(Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Configures the
Function used to deduce what the Tags should be for a message being monitored. |
protected void |
validate()
Validate whether the fields contained in this Builder as set accordingly.
|
public EventProcessorLatencyMonitor.Builder meterNamePrefix(String meterNamePrefix)
Gauge instances created by this
MessageMonitor.meterNamePrefix - a String used to prefix the names of the Gauge instances created by
this MessageMonitorpublic EventProcessorLatencyMonitor.Builder meterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
MeterRegistry used to registered the Gauge instances to.meterRegistry - the MeterRegistry used to registered the Gauge instances topublic EventProcessorLatencyMonitor.Builder clock(io.micrometer.core.instrument.Clock clock)
Clock used to define the processing duration of a given message being pushed through this
MessageMonitor. Defaults to the Clock.SYSTEM.clock - the Clock used to define the processing duration of a given messagepublic EventProcessorLatencyMonitor.Builder tagsBuilder(Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Function used to deduce what the Tags should be for a message being monitored.
Defaults to a Function returning Tags.empty().tagsBuilder - a Function used to deduce what the Tags should be for a message being
monitoredpublic EventProcessorLatencyMonitor build()
MessageTimerMonitor as specified through this Builder.MessageTimerMonitor as specified through this Builderprotected void validate()
AxonConfigurationException - if one field is asserted to be incorrect
according to the Builder's specificationsCopyright © 2010–2023. All rights reserved.