Source:
@Nullable private GridCommunicationClient createCommunicationClient(ClusterNode node, int connIdx) throws IgniteCheckedException { assert node != null; Integer shmemPort = node.attribute(createSpiAttributeName(ATTR_SHMEM_PORT)); ClusterNode locNode = getSpiContext().localNode(); if (locNode == null) throw new IgniteCheckedException("Failed to create NIO client (local node is stopping)"); if (log.isDebugEnabled()) log.debug("Creating NIO client to node: " + node); if (shmemPort != null && U.sameMacs(locNode, node)) { try { GridCommunicationClient client = createShmemClient( node, connIdx, shmemPort); if (log.isDebugEnabled()) log.debug("Shmem client created: " + client); return client; } catch (IgniteCheckedException e) { if (e.hasCause(IpcOutOfSystemResourcesException.class)) LT.warn(log, OUT_OF_RESOURCES_TCP_MSG); else if (getSpiContext().node(node.id()) != null) LT.warn(log, e.getMessage()); else if (log.isDebugEnabled()) log.debug("Failed to establish shared memory connection with local node (node has left): " + node.id()); } } final long start = System.currentTimeMillis(); GridCommunicationClient client = createTcpClient(node, connIdx); final long time = System.currentTimeMillis() - start; if (time > CONNECTION_ESTABLISH_THRESHOLD_MS) { if (log.isInfoEnabled()) log.warning("TCP client creation time more than " + CONNECTION_ESTABLISH_THRESHOLD_MS + "ms [client=" + clientString(client, node) + ", duration=" + time + "ms]"); } else if (log.isDebugEnabled()) log.debug("TCP client created [client=" + clientString(client, node) + ", duration=" + time + "ms]"); return client; }

Target:
@Nullable private GridCommunicationClient createCommunicationClient(ClusterNode node, int connIdx) throws IgniteCheckedException { assert node != null; Integer shmemPort = node.attribute(createSpiAttributeName(ATTR_SHMEM_PORT)); ClusterNode locNode = getSpiContext().localNode(); if (locNode == null) throw new IgniteCheckedException("Failed to create NIO client (local node is stopping)"); if (log.isDebugEnabled()) log.debug("Creating NIO client to node: " + node); if (shmemPort != null && U.sameMacs(locNode, node)) { try { GridCommunicationClient client = createShmemClient( node, connIdx, shmemPort); if (log.isDebugEnabled()) log.debug("Shmem client created: " + client); return client; } catch (IgniteCheckedException e) { if (e.hasCause(IpcOutOfSystemResourcesException.class)) LT.warn(log, OUT_OF_RESOURCES_TCP_MSG); else if (getSpiContext().node(node.id()) != null) LT.warn(log, e.getMessage()); else if (log.isDebugEnabled()) log.debug("Failed to establish shared memory connection with local node (node has left): " + node.id()); } } final long start = System.currentTimeMillis(); GridCommunicationClient client = createTcpClient(node, connIdx); final long time = System.currentTimeMillis() - start; if (time > CONNECTION_ESTABLISH_THRESHOLD_MS) log.warning("TCP client creation took longer than expected [threshold=" + CONNECTION_ESTABLISH_THRESHOLD_MS + "ms, client=" + clientString(client, node) + ", duration=" + time + "ms]"); else if (log.isDebugEnabled()) log.debug("TCP client created [client=" + clientString(client, node) + ", duration=" + time + "ms]"); return client; }