public abstract class AbstractMetricsCollector extends Object implements MetricsCollector
A common base class for all metrics collectors which emit events.
Modifier | Constructor and Description |
---|---|
protected |
AbstractMetricsCollector(EventBus eventBus,
rx.Scheduler scheduler,
MetricsCollectorConfig config) |
Modifier and Type | Method and Description |
---|---|
MetricsCollectorConfig |
config()
Its high-level configuration.
|
protected abstract CouchbaseEvent |
generateCouchbaseEvent()
Generate the actual
CouchbaseEvent to emit on every interval. |
boolean |
isEnabled()
True if this collector actually emits something.
|
boolean |
shutdown()
Shuts down the collector (non-reversible) and frees bound resources.
|
void |
triggerEmit()
Triggers the immediate emission of whatever is currently collected.
|
protected AbstractMetricsCollector(EventBus eventBus, rx.Scheduler scheduler, MetricsCollectorConfig config)
protected abstract CouchbaseEvent generateCouchbaseEvent()
Generate the actual CouchbaseEvent
to emit on every interval.
public MetricsCollectorConfig config()
MetricsCollector
Its high-level configuration.
config
in interface MetricsCollector
public boolean shutdown()
MetricsCollector
Shuts down the collector (non-reversible) and frees bound resources.
shutdown
in interface MetricsCollector
public boolean isEnabled()
MetricsCollector
True if this collector actually emits something.
isEnabled
in interface MetricsCollector
public void triggerEmit()
MetricsCollector
Triggers the immediate emission of whatever is currently collected. Useful for testing.
triggerEmit
in interface MetricsCollector
Copyright © 2017 Couchbase, Inc.. All rights reserved.