public class MessageTimerMonitor extends Object implements MessageMonitor<Message<?>>, com.codahale.metrics.MetricSet
MessageMonitor
which creates Timer
instances for the overall, success, failure and ignored time an
ingested Message
takes.Modifier and Type | Class and Description |
---|---|
static class |
MessageTimerMonitor.Builder
Builder class to instantiate a
MessageTimerMonitor . |
MessageMonitor.MonitorCallback
Modifier | Constructor and Description |
---|---|
|
MessageTimerMonitor()
Deprecated.
in favor of the
builder() |
|
MessageTimerMonitor(com.codahale.metrics.Clock clock)
Deprecated.
in favor of the
builder() |
protected |
MessageTimerMonitor(MessageTimerMonitor.Builder builder)
Instantiate a
MessageTimerMonitor based on the fields contained in the MessageTimerMonitor.Builder . |
Modifier and Type | Method and Description |
---|---|
static MessageTimerMonitor.Builder |
builder()
Instantiate a Builder to be able to create a
MessageTimerMonitor . |
Map<String,com.codahale.metrics.Metric> |
getMetrics() |
MessageMonitor.MonitorCallback |
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 message
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onMessagesIngested
protected MessageTimerMonitor(MessageTimerMonitor.Builder builder)
MessageTimerMonitor
based on the fields contained in the MessageTimerMonitor.Builder
.builder
- the MessageTimerMonitor.Builder
used to instantiate a MessageTimerMonitor
instance@Deprecated public MessageTimerMonitor()
builder()
@Deprecated public MessageTimerMonitor(com.codahale.metrics.Clock clock)
builder()
clock
- the clock used to measure the process time of each messagepublic static MessageTimerMonitor.Builder builder()
MessageTimerMonitor
.
The Clock
is defaulted to a Clock.defaultClock()
and the reservoirFactory
defaults to
creating a ExponentiallyDecayingReservoir
.
MessageTimerMonitor
public MessageMonitor.MonitorCallback onMessageIngested(@Nonnull Message<?> message)
MessageMonitor
onMessageIngested
in interface MessageMonitor<Message<?>>
message
- the message to monitorCopyright © 2010–2024. All rights reserved.