java.lang.Object
io.lettuce.core.event.metrics.DefaultCommandLatencyEventPublisher
- All Implemented Interfaces:
MetricEventPublisher
public class DefaultCommandLatencyEventPublisher extends Object implements MetricEventPublisher
Default implementation of a
CommandLatencyCollector for command latencies.- Author:
- Mark Paluch
-
Constructor Summary
Constructors Constructor Description DefaultCommandLatencyEventPublisher(EventExecutorGroup eventExecutorGroup, EventPublisherOptions options, EventBus eventBus, CommandLatencyCollector commandLatencyCollector) -
Method Summary
Modifier and Type Method Description voidemitMetricsEvent()Emit immediately a metrics event.booleanisEnabled()Returnstrueif the metric collector is enabled.voidshutdown()Shut down the event publisher.
-
Constructor Details
-
DefaultCommandLatencyEventPublisher
public DefaultCommandLatencyEventPublisher(EventExecutorGroup eventExecutorGroup, EventPublisherOptions options, EventBus eventBus, CommandLatencyCollector commandLatencyCollector)
-
-
Method Details
-
isEnabled
public boolean isEnabled()Description copied from interface:MetricEventPublisherReturnstrueif the metric collector is enabled.- Specified by:
isEnabledin interfaceMetricEventPublisher- Returns:
trueif the metric collector is enabled
-
shutdown
public void shutdown()Description copied from interface:MetricEventPublisherShut down the event publisher.- Specified by:
shutdownin interfaceMetricEventPublisher
-
emitMetricsEvent
public void emitMetricsEvent()Description copied from interface:MetricEventPublisherEmit immediately a metrics event.- Specified by:
emitMetricsEventin interfaceMetricEventPublisher
-