Package io.lettuce.core.event.metrics
Class DefaultCommandLatencyEventPublisher
- java.lang.Object
-
- io.lettuce.core.event.metrics.DefaultCommandLatencyEventPublisher
-
- All Implemented Interfaces:
MetricEventPublisher
public class DefaultCommandLatencyEventPublisher extends Object implements MetricEventPublisher
Default implementation of aCommandLatencyCollector
for command latencies.- Author:
- Mark Paluch
-
-
Constructor Summary
Constructors Constructor Description DefaultCommandLatencyEventPublisher(EventExecutorGroup eventExecutorGroup, EventPublisherOptions options, EventBus eventBus, CommandLatencyCollector commandLatencyCollector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
emitMetricsEvent()
Emit immediately a metrics event.boolean
isEnabled()
Returnstrue
if the metric collector is enabled.void
shutdown()
Shut down the event publisher.
-
-
-
Constructor Detail
-
DefaultCommandLatencyEventPublisher
public DefaultCommandLatencyEventPublisher(EventExecutorGroup eventExecutorGroup, EventPublisherOptions options, EventBus eventBus, CommandLatencyCollector commandLatencyCollector)
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Description copied from interface:MetricEventPublisher
Returnstrue
if the metric collector is enabled.- Specified by:
isEnabled
in interfaceMetricEventPublisher
- Returns:
true
if the metric collector is enabled
-
shutdown
public void shutdown()
Description copied from interface:MetricEventPublisher
Shut down the event publisher.- Specified by:
shutdown
in interfaceMetricEventPublisher
-
emitMetricsEvent
public void emitMetricsEvent()
Description copied from interface:MetricEventPublisher
Emit immediately a metrics event.- Specified by:
emitMetricsEvent
in interfaceMetricEventPublisher
-
-