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,
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, Scheduler scheduler, MetricsCollectorConfig config)
protected abstract CouchbaseEvent generateCouchbaseEvent()
Generate the actual CouchbaseEvent to emit on every interval.
public MetricsCollectorConfig config()
MetricsCollectorIts high-level configuration.
config in interface MetricsCollectorpublic boolean shutdown()
MetricsCollectorShuts down the collector (non-reversible) and frees bound resources.
shutdown in interface MetricsCollectorpublic boolean isEnabled()
MetricsCollectorTrue if this collector actually emits something.
isEnabled in interface MetricsCollectorpublic void triggerEmit()
MetricsCollectorTriggers the immediate emission of whatever is currently collected. Useful for testing.
triggerEmit in interface MetricsCollectorCopyright © 2016 Couchbase, Inc.. All rights reserved.