public class EventProcessorLatencyMonitor extends Object implements MessageMonitor<EventMessage<?>>
Modifier and Type | Class and Description |
---|---|
static class |
EventProcessorLatencyMonitor.Builder
Builder class to instantiate a
EventProcessorLatencyMonitor . |
MessageMonitor.MonitorCallback
Modifier | Constructor and Description |
---|---|
protected |
EventProcessorLatencyMonitor(EventProcessorLatencyMonitor.Builder builder)
Instantiate a
EventProcessorLatencyMonitor based on the fields contained in the EventProcessorLatencyMonitor.Builder . |
Modifier and Type | Method and Description |
---|---|
static EventProcessorLatencyMonitor.Builder |
builder()
Instantiate a Builder to be able to create a
EventProcessorLatencyMonitor . |
static EventProcessorLatencyMonitor |
buildMonitor(String meterNamePrefix,
io.micrometer.core.instrument.MeterRegistry meterRegistry)
Deprecated.
in favor of using the
builder() |
static EventProcessorLatencyMonitor |
buildMonitor(String meterNamePrefix,
io.micrometer.core.instrument.MeterRegistry meterRegistry,
Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Deprecated.
in favor of using the
builder() |
MessageMonitor.MonitorCallback |
onMessageIngested(EventMessage<?> message)
Takes a message and returns a callback that should be used
to inform the message monitor about the result of processing the message
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onMessagesIngested
protected EventProcessorLatencyMonitor(EventProcessorLatencyMonitor.Builder builder)
EventProcessorLatencyMonitor
based on the fields contained in the EventProcessorLatencyMonitor.Builder
.
Will assert that the meterNamePrefix
and MeterRegistry
are not null
and will throw an
AxonConfigurationException
if this is the case.
builder
- the EventProcessorLatencyMonitor.Builder
used to instantiate a EventProcessorLatencyMonitor
instancepublic static EventProcessorLatencyMonitor.Builder builder()
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.
EventProcessorLatencyMonitor
@Deprecated public static EventProcessorLatencyMonitor buildMonitor(String meterNamePrefix, io.micrometer.core.instrument.MeterRegistry meterRegistry)
builder()
EventProcessorLatencyMonitor
meterNamePrefix
- the prefix for the meter name that will be created in the given meterRegistry
meterRegistry
- the meter registry used to create and register the metersEventProcessorLatencyMonitor
@Deprecated public static EventProcessorLatencyMonitor buildMonitor(String meterNamePrefix, io.micrometer.core.instrument.MeterRegistry meterRegistry, Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
builder()
EventProcessorLatencyMonitor
.meterNamePrefix
- the prefix for the meter name that will be created in the given meterRegistry
meterRegistry
- the meter registry used to create and register the meterstagsBuilder
- the function used to construct the list of micrometer Tag
, based on the ingested
messageEventProcessorLatencyMonitor
public MessageMonitor.MonitorCallback onMessageIngested(EventMessage<?> message)
MessageMonitor
onMessageIngested
in interface MessageMonitor<EventMessage<?>>
message
- the message to monitorCopyright © 2010–2022. All rights reserved.