Package org.apache.ignite.spi.metric
Interface ReadOnlyMetricRegistry
- 
- All Known Subinterfaces:
- MetricRegistry
 
 public interface ReadOnlyMetricRegistry extends Iterable<Metric> Read only metric registry.Java exampleSee the example below of how the internal metrics can be obtained through your application usingReadOnlyMetricRegistry.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")); - See Also:
- JmxMetricExporterSpi,- MetricExporterSpi
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description <M extends Metric>
 MfindMetric(String name)Stringname()- 
Methods inherited from interface java.lang.IterableforEach, iterator, spliterator
 
- 
 
-