Search in sources :

Example 1 with GenericExportedValue

use of org.spf4j.jmx.GenericExportedValue in project spf4j by zolyfarkas.

the class ScalableMeasurementRecorder method registerJmx.

@SuppressWarnings("unchecked")
public void registerJmx() {
    MeasurementsInfo info = processorTemplate.getInfo();
    new DynamicMBeanBuilder().withJmxExportObject(this).withAttribute(new GenericExportedValue<>("measurements", info.getDescription(), this::getCompositeData, null, getInfo().toCompositeType())).register("org.spf4j.perf.recorders", info.getMeasuredEntity().toString());
}
Also used : MeasurementsInfo(org.spf4j.perf.MeasurementsInfo) GenericExportedValue(org.spf4j.jmx.GenericExportedValue) DynamicMBeanBuilder(org.spf4j.jmx.DynamicMBeanBuilder)

Example 2 with GenericExportedValue

use of org.spf4j.jmx.GenericExportedValue in project spf4j by zolyfarkas.

the class ScalableMeasurementRecorderSource method registerJmx.

@SuppressWarnings("unchecked")
public void registerJmx() {
    MeasurementsInfo info = this.processorTemplate.getInfo();
    new DynamicMBeanBuilder().withJmxExportObject(this).withAttribute(new GenericExportedValue<>("measurements", info.getDescription(), this::getMeasurements, null, info.toCompositeType())).register("org.spf4j.perf.recorders", info.getMeasuredEntity().toString());
}
Also used : MeasurementsInfo(org.spf4j.perf.MeasurementsInfo) GenericExportedValue(org.spf4j.jmx.GenericExportedValue) DynamicMBeanBuilder(org.spf4j.jmx.DynamicMBeanBuilder)

Aggregations

DynamicMBeanBuilder (org.spf4j.jmx.DynamicMBeanBuilder)2 GenericExportedValue (org.spf4j.jmx.GenericExportedValue)2 MeasurementsInfo (org.spf4j.perf.MeasurementsInfo)2