public abstract class AbstractLatencyMetricsCollector<I extends LatencyMetricsIdentifier,E extends LatencyMetricsEvent> extends AbstractMetricsCollector implements LatencyMetricsCollector<I>
The default abstract implementation for a latency metrics collector.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLatencyMetricsCollector(EventBus eventBus,
Scheduler scheduler,
LatencyMetricsCollectorConfig config) |
| Modifier and Type | Method and Description |
|---|---|
LatencyMetricsCollectorConfig |
config()
Its high-level configuration.
|
protected CouchbaseEvent |
generateCouchbaseEvent()
Generate the actual
CouchbaseEvent to emit on every interval. |
protected abstract E |
generateLatencyMetricsEvent(Map<I,org.LatencyUtils.LatencyStats> latencyMetrics) |
void |
record(I identifier,
long latency)
Records a latency for the given identifier.
|
protected void |
remove(I identifier)
Helper method to remove an item out of the stored metrics.
|
boolean |
shutdown()
Shuts down the collector (non-reversible) and frees bound resources.
|
isEnabled, triggerEmitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEnabled, triggerEmitprotected AbstractLatencyMetricsCollector(EventBus eventBus, Scheduler scheduler, LatencyMetricsCollectorConfig config)
protected abstract E generateLatencyMetricsEvent(Map<I,org.LatencyUtils.LatencyStats> latencyMetrics)
protected CouchbaseEvent generateCouchbaseEvent()
AbstractMetricsCollectorGenerate the actual CouchbaseEvent to emit on every interval.
generateCouchbaseEvent in class AbstractMetricsCollectorpublic void record(I identifier, long latency)
LatencyMetricsCollectorRecords a latency for the given identifier.
record in interface LatencyMetricsCollector<I extends LatencyMetricsIdentifier>identifier - the unique identifier to use.latency - the latency to record for it.public boolean shutdown()
MetricsCollectorShuts down the collector (non-reversible) and frees bound resources.
shutdown in interface MetricsCollectorshutdown in class AbstractMetricsCollectorpublic LatencyMetricsCollectorConfig config()
MetricsCollectorIts high-level configuration.
config in interface LatencyMetricsCollector<I extends LatencyMetricsIdentifier>config in interface MetricsCollectorconfig in class AbstractMetricsCollectorprotected void remove(I identifier)
Helper method to remove an item out of the stored metrics.
Copyright © 2016 Couchbase, Inc.. All rights reserved.