Search in sources :

Example 1 with MemoryMetrics

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);
    }
}
Also used : MemoryMetrics(org.apache.ignite.MemoryMetrics)

Example 2 with MemoryMetrics

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);
    }
}
Also used : MemoryMetrics(org.apache.ignite.MemoryMetrics) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) MemoryPolicyConfiguration(org.apache.ignite.configuration.MemoryPolicyConfiguration)

Aggregations

MemoryMetrics (org.apache.ignite.MemoryMetrics)2 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)1 MemoryPolicyConfiguration (org.apache.ignite.configuration.MemoryPolicyConfiguration)1