public interface ReadOnlyMetricRegistry extends Iterable<Metric>
ReadOnlyMetricRegistry
.
JmxMetricExporterSpi jmxSpi = new JmxMetricExporterSpi(); Ignite ignite = Ignition.start(new IgniteConfiguration() .setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setMaxSize(12_000_000))) .setIgniteInstanceName("jmxExampleInstanceName") .setMetricExporterSpi(jmxSpi)); ReadOnlyMetricRegistry ioReg = jmxSpi.getSpiContext().getOrCreateMetricRegistry("io.dataregion.default"); SetlistOfMetrics = StreamSupport.stream(ioReg.spliterator(), false) .map(Metric::name) .collect(toSet()); System.out.println("The list of available data region metrics: " + listOfMetrics); System.out.println("The 'default' data region MaxSize: " + ioReg.findMetric("MaxSize"));
JmxMetricExporterSpi
,
MetricExporterSpi
Modifier and Type | Method and Description |
---|---|
<M extends Metric> |
findMetric(String name) |
String |
name() |
forEach, iterator, spliterator
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023