Class JvmMetricsCollectorBase
java.lang.Object
com.itrsgroup.collection.instr.jvm.JvmMetricsCollectorBase
- All Implemented Interfaces:
JvmMetricsCollector
Base for all
JvmMetricsCollector implementations.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJvmMetricsCollectorBase(MetricsClient client, Consumer<Throwable> errorCallback, MXBeanSupplier mxBeanSupplier) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPublish an attribute only if the value is not null.protected voidPublish an attribute only if the value is not null.protected voidPublish a gauge.protected voidPublish a gauge.protected voidPublish a gauge.protected voidPublish a gauge.protected MXBeanSupplierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itrsgroup.collection.instr.jvm.JvmMetricsCollector
collect
-
Constructor Details
-
JvmMetricsCollectorBase
protected JvmMetricsCollectorBase(MetricsClient client, Consumer<Throwable> errorCallback, MXBeanSupplier mxBeanSupplier) Constructor.- Parameters:
client- metrics clienterrorCallback- error callbackmxBeanSupplier- MX bean supplier
-
-
Method Details
-
mxBeanSupplier
- Returns:
- MX bean supplier
-
errorCallback
- Returns:
- error callback
-
attribute
Publish an attribute only if the value is not null.- Parameters:
metric- metric namevalue- value, can be null
-
attribute
Publish an attribute only if the value is not null.- Parameters:
metric- metric namevalue- value, can be nulldimensions- dimensions
-
gauge
Publish a gauge.- Parameters:
metric- metricvalue- value
-
gauge
Publish a gauge.- Parameters:
metric- metricvalue- valueunit- unit
-
gauge
Publish a gauge.- Parameters:
metric- metricvalue- valuedims- dimensions
-
gauge
Publish a gauge.- Parameters:
metric- metricvalue- valueunit- unitdims- dimensions
-