use of org.apache.ignite.MemoryMetrics in project ignite by apache.
the class PlatformClusterGroup method processOutStream.
/** {@inheritDoc} */
@SuppressWarnings("deprecation")
@Override
public void processOutStream(int type, BinaryRawWriterEx writer) throws IgniteCheckedException {
switch(type) {
case OP_METRICS:
platformCtx.writeClusterMetrics(writer, prj.metrics());
break;
case OP_MEMORY_METRICS:
Collection<MemoryMetrics> metrics = prj.ignite().memoryMetrics();
writer.writeInt(metrics.size());
for (MemoryMetrics m : metrics) {
writeMemoryMetrics(writer, m);
}
break;
default:
super.processOutStream(type, writer);
}
}
use of org.apache.ignite.MemoryMetrics in project ignite by apache.
the class IgniteCacheDatabaseSharedManager method registerMetricsMBeans.
/**
* Registers MBeans for all MemoryMetrics configured in this instance.
*/
private void registerMetricsMBeans() {
IgniteConfiguration cfg = cctx.gridConfig();
for (MemoryMetrics memMetrics : memMetricsMap.values()) {
MemoryPolicyConfiguration memPlcCfg = memPlcMap.get(memMetrics.getName()).config();
registerMetricsMBean((MemoryMetricsImpl) memMetrics, memPlcCfg, cfg);
}
}
Aggregations