Search in sources :

Example 1 with TcpCommunicationSpiMBeanImpl

use of org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationSpiMBeanImpl in project ignite by apache.

the class TcpCommunicationSpi method onContextInitialized0.

/**
 * {@inheritDoc} }
 */
@Override
public void onContextInitialized0(IgniteSpiContext spiCtx) throws IgniteSpiException {
    if (cfg.boundTcpPort() > 0)
        spiCtx.registerPort(cfg.boundTcpPort(), IgnitePortProtocol.TCP);
    spiCtx.addLocalEventListener(discoLsnr, EVT_NODE_LEFT, EVT_NODE_FAILED);
    metricsLsnr = new TcpCommunicationMetricsListener(ignite, spiCtx);
    registerMBean(igniteInstanceName, new TcpCommunicationSpiMBeanImpl(this, metricsLsnr, cfg, stateProvider), TcpCommunicationSpiMBean.class);
    srvLsnr.metricsListener(metricsLsnr);
    clientPool.metricsListener(metricsLsnr);
    ((CommunicationDiscoveryEventListener) discoLsnr).metricsListener(metricsLsnr);
    ctxInitLatch.countDown();
}
Also used : CommunicationDiscoveryEventListener(org.apache.ignite.spi.communication.tcp.internal.CommunicationDiscoveryEventListener) TcpCommunicationSpiMBeanImpl(org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationSpiMBeanImpl)

Aggregations

CommunicationDiscoveryEventListener (org.apache.ignite.spi.communication.tcp.internal.CommunicationDiscoveryEventListener)1 TcpCommunicationSpiMBeanImpl (org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationSpiMBeanImpl)1