Search in sources :

Example 1 with CONN_IDX_META

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONN_IDX_META in project ignite by apache.

the class GridNioServerWrapper method resetNioServer.

/**
 * Recreates tpcSrvr socket instance.
 *
 * @return Server instance.
 * @throws IgniteCheckedException Thrown if it's not possible to create server.
 */
public GridNioServer<Message> resetNioServer() throws IgniteCheckedException {
    if (cfg.boundTcpPort() >= 0)
        throw new IgniteCheckedException("Tcp NIO server was already created on port " + cfg.boundTcpPort());
    IgniteCheckedException lastEx = null;
    // If configured TCP port is busy, find first available in range.
    int lastPort = cfg.localPort() == -1 ? -1 : cfg.localPortRange() == 0 ? cfg.localPort() : cfg.localPort() + cfg.localPortRange() - 1;
    for (int port = cfg.localPort(); port <= lastPort; port++) {
        try {
            MessageFactory msgFactory = new MessageFactory() {

                private MessageFactory impl;

                @Nullable
                @Override
                public Message create(short type) {
                    if (impl == null)
                        impl = stateProvider.getSpiContext().messageFactory();
                    assert impl != null;
                    return impl.create(type);
                }
            };
            GridNioMessageReaderFactory readerFactory = new GridNioMessageReaderFactory() {

                private IgniteSpiContext context;

                private MessageFormatter formatter;

                @Override
                public MessageReader reader(GridNioSession ses, MessageFactory msgFactory) throws IgniteCheckedException {
                    final IgniteSpiContext ctx = stateProvider.getSpiContextWithoutInitialLatch();
                    if (formatter == null || context != ctx) {
                        context = ctx;
                        formatter = context.messageFormatter();
                    }
                    assert formatter != null;
                    ConnectionKey key = ses.meta(CONN_IDX_META);
                    return key != null ? formatter.reader(key.nodeId(), msgFactory) : null;
                }
            };
            GridNioMessageWriterFactory writerFactory = new GridNioMessageWriterFactory() {

                private IgniteSpiContext context;

                private MessageFormatter formatter;

                @Override
                public MessageWriter writer(GridNioSession ses) throws IgniteCheckedException {
                    final IgniteSpiContext ctx = stateProvider.getSpiContextWithoutInitialLatch();
                    if (formatter == null || context != ctx) {
                        context = ctx;
                        formatter = context.messageFormatter();
                    }
                    assert formatter != null;
                    ConnectionKey key = ses.meta(CONN_IDX_META);
                    return key != null ? formatter.writer(key.nodeId()) : null;
                }
            };
            GridDirectParser parser = new GridDirectParser(log.getLogger(GridDirectParser.class), msgFactory, readerFactory);
            IgnitePredicate<Message> skipRecoveryPred = msg -> msg instanceof RecoveryLastReceivedMessage;
            boolean clientMode = Boolean.TRUE.equals(igniteCfg.isClientMode());
            IgniteBiInClosure<GridNioSession, Integer> queueSizeMonitor = !clientMode && cfg.slowClientQueueLimit() > 0 ? this::checkClientQueueSize : null;
            List<GridNioFilter> filters = new ArrayList<>();
            if (tracing instanceof GridTracingManager && ((GridManager) tracing).enabled())
                filters.add(new GridNioTracerFilter(log, tracing));
            filters.add(new GridNioCodecFilter(parser, log, true));
            filters.add(new GridConnectionBytesVerifyFilter(log));
            if (stateProvider.isSslEnabled()) {
                GridNioSslFilter sslFilter = new GridNioSslFilter(igniteCfg.getSslContextFactory().create(), true, ByteOrder.LITTLE_ENDIAN, log, metricMgr == null ? null : metricMgr.registry(COMMUNICATION_METRICS_GROUP_NAME));
                sslFilter.directMode(true);
                sslFilter.wantClientAuth(true);
                sslFilter.needClientAuth(true);
                filters.add(sslFilter);
            }
            GridNioServer.Builder<Message> builder = GridNioServer.<Message>builder().address(cfg.localHost()).port(port).listener(srvLsnr).logger(log).selectorCount(cfg.selectorsCount()).igniteInstanceName(igniteInstanceName).serverName("tcp-comm").tcpNoDelay(cfg.tcpNoDelay()).directBuffer(cfg.directBuffer()).byteOrder(ByteOrder.LITTLE_ENDIAN).socketSendBufferSize(cfg.socketSendBuffer()).socketReceiveBufferSize(cfg.socketReceiveBuffer()).sendQueueLimit(cfg.messageQueueLimit()).directMode(true).writeTimeout(cfg.socketWriteTimeout()).selectorSpins(cfg.selectorSpins()).filters(filters.toArray(new GridNioFilter[filters.size()])).writerFactory(writerFactory).skipRecoveryPredicate(skipRecoveryPred).messageQueueSizeListener(queueSizeMonitor).tracing(tracing).readWriteSelectorsAssign(cfg.usePairedConnections());
            if (metricMgr != null) {
                builder.workerListener(workersRegistry).metricRegistry(metricMgr.registry(COMMUNICATION_METRICS_GROUP_NAME));
            }
            GridNioServer<Message> srvr = builder.build();
            cfg.boundTcpPort(port);
            // Ack Port the TCP server was bound to.
            if (log.isInfoEnabled()) {
                log.info("Successfully bound communication NIO server to TCP port " + "[port=" + cfg.boundTcpPort() + ", locHost=" + cfg.localHost() + ", selectorsCnt=" + cfg.selectorsCount() + ", selectorSpins=" + srvr.selectorSpins() + ", pairedConn=" + cfg.usePairedConnections() + ']');
            }
            srvr.idleTimeout(cfg.idleConnectionTimeout());
            return srvr;
        } catch (IgniteCheckedException e) {
            if (X.hasCause(e, SSLException.class))
                throw new IgniteSpiException("Failed to create SSL context. SSL factory: " + igniteCfg.getSslContextFactory() + '.', e);
            lastEx = e;
            if (log.isDebugEnabled())
                log.debug("Failed to bind to local port (will try next port within range) [port=" + port + ", locHost=" + cfg.localHost() + ']');
            eRegistrySupplier.get().onException("Failed to bind to local port (will try next port within range) [port=" + port + ", locHost=" + cfg.localHost() + ']', e);
        }
    }
    // If free port wasn't found.
    throw new IgniteCheckedException("Failed to bind to any port within range [startPort=" + cfg.localPort() + ", portRange=" + cfg.localPortRange() + ", locHost=" + cfg.localHost() + ']', lastEx);
}
Also used : CommunicationTcpUtils.usePairedConnections(org.apache.ignite.spi.communication.tcp.internal.CommunicationTcpUtils.usePairedConnections) GridNioSession(org.apache.ignite.internal.util.nio.GridNioSession) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) GridConnectionBytesVerifyFilter(org.apache.ignite.internal.util.nio.GridConnectionBytesVerifyFilter) NEED_WAIT(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.NEED_WAIT) ThrowableSupplier(org.apache.ignite.internal.util.function.ThrowableSupplier) GridNioSessionMetaKey(org.apache.ignite.internal.util.nio.GridNioSessionMetaKey) Executors.newSingleThreadScheduledExecutor(java.util.concurrent.Executors.newSingleThreadScheduledExecutor) Map(java.util.Map) GridTcpNioCommunicationClient(org.apache.ignite.internal.util.nio.GridTcpNioCommunicationClient) Channel(java.nio.channels.Channel) CommunicationTcpUtils.handshakeTimeoutException(org.apache.ignite.spi.communication.tcp.internal.CommunicationTcpUtils.handshakeTimeoutException) GridNioServer(org.apache.ignite.internal.util.nio.GridNioServer) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) Set(java.util.Set) RecoveryLastReceivedMessage(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage) COMMUNICATION_METRICS_GROUP_NAME(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.COMMUNICATION_METRICS_GROUP_NAME) ByteOrder(java.nio.ByteOrder) ExponentialBackoffTimeoutStrategy(org.apache.ignite.spi.ExponentialBackoffTimeoutStrategy) SSLException(javax.net.ssl.SSLException) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) IgniteSpiOperationTimeoutException(org.apache.ignite.spi.IgniteSpiOperationTimeoutException) GridNioSslFilter(org.apache.ignite.internal.util.nio.ssl.GridNioSslFilter) Message(org.apache.ignite.plugin.extensions.communication.Message) ALREADY_CONNECTED(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.ALREADY_CONNECTED) IgniteSpiException(org.apache.ignite.spi.IgniteSpiException) GridSelectorNioSessionImpl(org.apache.ignite.internal.util.nio.GridSelectorNioSessionImpl) U(org.apache.ignite.internal.util.typedef.internal.U) IgniteLogger(org.apache.ignite.IgniteLogger) GridDirectParser(org.apache.ignite.internal.util.nio.GridDirectParser) Supplier(java.util.function.Supplier) GridNioMessageWriterFactory(org.apache.ignite.internal.util.nio.GridNioMessageWriterFactory) ArrayList(java.util.ArrayList) IgniteBiInClosure(org.apache.ignite.lang.IgniteBiInClosure) SocketException(java.net.SocketException) ClusterNode(org.apache.ignite.cluster.ClusterNode) SocketTimeoutException(java.net.SocketTimeoutException) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) CONN_IDX_META(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONN_IDX_META) IgniteExceptionRegistry(org.apache.ignite.internal.util.IgniteExceptionRegistry) IOException(java.io.IOException) CommunicationTcpUtils.isRecoverableException(org.apache.ignite.spi.communication.tcp.internal.CommunicationTcpUtils.isRecoverableException) HandshakeMessage(org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage) GridTracingManager(org.apache.ignite.internal.managers.tracing.GridTracingManager) CHANNEL_COMMUNICATION(org.apache.ignite.internal.IgniteFeatures.CHANNEL_COMMUNICATION) GridNioRecoveryDescriptor(org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) CommunicationTcpUtils.nodeAddresses(org.apache.ignite.spi.communication.tcp.internal.CommunicationTcpUtils.nodeAddresses) SocketAddress(java.net.SocketAddress) GridNioCodecFilter(org.apache.ignite.internal.util.nio.GridNioCodecFilter) IgniteFeatures.nodeSupports(org.apache.ignite.internal.IgniteFeatures.nodeSupports) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) SocketChannel(java.nio.channels.SocketChannel) GridNioTracerFilter(org.apache.ignite.internal.util.nio.GridNioTracerFilter) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) X(org.apache.ignite.internal.util.typedef.X) CONSISTENT_ID_META(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONSISTENT_ID_META) GridConcurrentFactory(org.apache.ignite.internal.util.GridConcurrentFactory) GridSslMeta(org.apache.ignite.internal.util.nio.ssl.GridSslMeta) WorkersRegistry(org.apache.ignite.internal.worker.WorkersRegistry) MessageFormatter(org.apache.ignite.plugin.extensions.communication.MessageFormatter) IgniteThreadFactory(org.apache.ignite.thread.IgniteThreadFactory) NodeIdMessage(org.apache.ignite.spi.communication.tcp.messages.NodeIdMessage) IgniteDiscoveryThread(org.apache.ignite.spi.discovery.IgniteDiscoveryThread) SSL_META(org.apache.ignite.internal.util.nio.GridNioSessionMetaKey.SSL_META) Collection(java.util.Collection) UUID(java.util.UUID) InetSocketAddress(java.net.InetSocketAddress) AttributeNames(org.apache.ignite.spi.communication.tcp.AttributeNames) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) GridCommunicationClient(org.apache.ignite.internal.util.nio.GridCommunicationClient) TimeoutStrategy(org.apache.ignite.spi.TimeoutStrategy) NODE_STOPPING(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.NODE_STOPPING) CommunicationListener(org.apache.ignite.spi.communication.CommunicationListener) Tracing(org.apache.ignite.internal.processors.tracing.Tracing) IgniteSpiContext(org.apache.ignite.spi.IgniteSpiContext) HashMap(java.util.HashMap) Function(java.util.function.Function) ConcurrentMap(java.util.concurrent.ConcurrentMap) SSLEngine(javax.net.ssl.SSLEngine) GridNioMessageReaderFactory(org.apache.ignite.internal.util.nio.GridNioMessageReaderFactory) HashSet(java.util.HashSet) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) MessageWriter(org.apache.ignite.plugin.extensions.communication.MessageWriter) ThrowableBiFunction(org.apache.ignite.internal.util.function.ThrowableBiFunction) MessageFactory(org.apache.ignite.plugin.extensions.communication.MessageFactory) IgniteTooManyOpenFilesException(org.apache.ignite.internal.IgniteTooManyOpenFilesException) GridManager(org.apache.ignite.internal.managers.GridManager) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) GridNioFilter(org.apache.ignite.internal.util.nio.GridNioFilter) MessageReader(org.apache.ignite.plugin.extensions.communication.MessageReader) TimeUnit(java.util.concurrent.TimeUnit) GridNioServerListener(org.apache.ignite.internal.util.nio.GridNioServerListener) GridMetricManager(org.apache.ignite.internal.processors.metric.GridMetricManager) UNKNOWN_NODE(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.UNKNOWN_NODE) HandshakeMessage2(org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage2) GridNioFilter(org.apache.ignite.internal.util.nio.GridNioFilter) IgniteSpiContext(org.apache.ignite.spi.IgniteSpiContext) GridNioSession(org.apache.ignite.internal.util.nio.GridNioSession) RecoveryLastReceivedMessage(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage) Message(org.apache.ignite.plugin.extensions.communication.Message) HandshakeMessage(org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage) NodeIdMessage(org.apache.ignite.spi.communication.tcp.messages.NodeIdMessage) ArrayList(java.util.ArrayList) MessageFormatter(org.apache.ignite.plugin.extensions.communication.MessageFormatter) GridNioSslFilter(org.apache.ignite.internal.util.nio.ssl.GridNioSslFilter) SSLException(javax.net.ssl.SSLException) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) GridDirectParser(org.apache.ignite.internal.util.nio.GridDirectParser) IgniteSpiException(org.apache.ignite.spi.IgniteSpiException) GridNioMessageWriterFactory(org.apache.ignite.internal.util.nio.GridNioMessageWriterFactory) RecoveryLastReceivedMessage(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage) MessageFactory(org.apache.ignite.plugin.extensions.communication.MessageFactory) GridNioTracerFilter(org.apache.ignite.internal.util.nio.GridNioTracerFilter) GridConnectionBytesVerifyFilter(org.apache.ignite.internal.util.nio.GridConnectionBytesVerifyFilter) GridNioServer(org.apache.ignite.internal.util.nio.GridNioServer) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) GridTracingManager(org.apache.ignite.internal.managers.tracing.GridTracingManager) GridNioCodecFilter(org.apache.ignite.internal.util.nio.GridNioCodecFilter) GridNioMessageReaderFactory(org.apache.ignite.internal.util.nio.GridNioMessageReaderFactory)

Example 2 with CONN_IDX_META

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONN_IDX_META in project ignite by apache.

the class InboundConnectionHandler method onFirstMessage.

/**
 * @param ses Session.
 * @param msg Message.
 */
private void onFirstMessage(final GridNioSession ses, Message msg) {
    UUID sndId;
    ConnectionKey connKey;
    if (msg instanceof NodeIdMessage) {
        sndId = U.bytesToUuid(((NodeIdMessage) msg).nodeIdBytes(), 0);
        connKey = new ConnectionKey(sndId, 0, -1);
    } else {
        assert msg instanceof HandshakeMessage : msg;
        HandshakeMessage msg0 = (HandshakeMessage) msg;
        sndId = ((HandshakeMessage) msg).nodeId();
        connKey = new ConnectionKey(sndId, msg0.connectionIndex(), msg0.connectCount());
    }
    if (log.isDebugEnabled())
        log.debug("Remote node ID received: " + sndId);
    final ClusterNode rmtNode = nodeGetter.apply(sndId);
    if (rmtNode == null) {
        DiscoverySpi discoverySpi = igniteExSupplier.get().configuration().getDiscoverySpi();
        boolean unknownNode = true;
        if (discoverySpi instanceof TcpDiscoverySpi) {
            TcpDiscoverySpi tcpDiscoverySpi = (TcpDiscoverySpi) discoverySpi;
            ClusterNode node0 = tcpDiscoverySpi.getNode0(sndId);
            if (node0 != null) {
                assert node0.isClient() : node0;
                if (node0.version().compareTo(VERSION_SINCE_CLIENT_COULD_WAIT_TO_CONNECT) >= 0)
                    unknownNode = false;
            }
        } else if (discoverySpi instanceof IgniteDiscoverySpi)
            unknownNode = !((IgniteDiscoverySpi) discoverySpi).knownNode(sndId);
        if (unknownNode) {
            U.warn(log, "Close incoming connection, unknown node [nodeId=" + sndId + ", ses=" + ses + ']');
            ses.send(new RecoveryLastReceivedMessage(UNKNOWN_NODE)).listen(fut -> ses.close());
        } else
            ses.send(new RecoveryLastReceivedMessage(NEED_WAIT)).listen(fut -> ses.close());
        return;
    }
    ses.addMeta(CONSISTENT_ID_META, rmtNode.consistentId());
    final ConnectionKey old = ses.addMeta(CONN_IDX_META, connKey);
    assert old == null;
    ClusterNode locNode = locNodeSupplier.get();
    if (ses.remoteAddress() == null)
        return;
    assert msg instanceof HandshakeMessage : msg;
    HandshakeMessage msg0 = (HandshakeMessage) msg;
    if (log.isDebugEnabled()) {
        log.debug("Received handshake message [locNodeId=" + locNode.id() + ", rmtNodeId=" + sndId + ", msg=" + msg0 + ']');
    }
    if (isChannelConnIdx(msg0.connectionIndex()))
        ses.send(new RecoveryLastReceivedMessage(0));
    else if (cfg.usePairedConnections() && usePairedConnections(rmtNode, attributeNames.pairedConnection())) {
        final GridNioRecoveryDescriptor recoveryDesc = nioSrvWrapper.inRecoveryDescriptor(rmtNode, connKey);
        ConnectClosureNew c = new ConnectClosureNew(ses, recoveryDesc, rmtNode);
        boolean reserve = recoveryDesc.tryReserve(msg0.connectCount(), c);
        if (reserve)
            connectedNew(recoveryDesc, ses, true);
        else {
            if (c.failed) {
                ses.send(new RecoveryLastReceivedMessage(ALREADY_CONNECTED));
                closeStaleConnections(connKey);
            }
        }
    } else {
        assert connKey.connectionIndex() >= 0 : connKey;
        GridCommunicationClient[] curClients = clientPool.clientFor(sndId);
        GridCommunicationClient oldClient = curClients != null && connKey.connectionIndex() < curClients.length ? curClients[connKey.connectionIndex()] : null;
        if (oldClient instanceof GridTcpNioCommunicationClient) {
            if (log.isInfoEnabled())
                log.info("Received incoming connection when already connected " + "to this node, rejecting [locNode=" + locNode.id() + ", rmtNode=" + sndId + ']');
            ses.send(new RecoveryLastReceivedMessage(ALREADY_CONNECTED));
            closeStaleConnections(connKey);
            return;
        }
        GridFutureAdapter<GridCommunicationClient> fut = new GridFutureAdapter<>();
        GridFutureAdapter<GridCommunicationClient> oldFut = clientPool.putIfAbsentFut(connKey, fut);
        final GridNioRecoveryDescriptor recoveryDesc = nioSrvWrapper.inRecoveryDescriptor(rmtNode, connKey);
        if (oldFut == null) {
            curClients = clientPool.clientFor(sndId);
            oldClient = curClients != null && connKey.connectionIndex() < curClients.length ? curClients[connKey.connectionIndex()] : null;
            if (oldClient instanceof GridTcpNioCommunicationClient) {
                assert oldClient.connectionIndex() == connKey.connectionIndex() : oldClient;
                if (log.isInfoEnabled())
                    log.info("Received incoming connection when already connected " + "to this node, rejecting [locNode=" + locNode.id() + ", rmtNode=" + sndId + ']');
                ses.send(new RecoveryLastReceivedMessage(ALREADY_CONNECTED));
                closeStaleConnections(connKey);
                fut.onDone(oldClient);
                return;
            }
            boolean reserved = recoveryDesc.tryReserve(msg0.connectCount(), new ConnectClosure(ses, recoveryDesc, rmtNode, connKey, msg0, true, fut));
            if (log.isDebugEnabled()) {
                log.debug("Received incoming connection from remote node " + "[rmtNode=" + rmtNode.id() + ", reserved=" + reserved + ", recovery=" + recoveryDesc + ']');
            }
            if (reserved) {
                try {
                    GridTcpNioCommunicationClient client = connected(recoveryDesc, ses, rmtNode, msg0.received(), true, true);
                    fut.onDone(client);
                } finally {
                    clientPool.removeFut(connKey, fut);
                }
            }
        } else {
            if (oldFut instanceof ConnectFuture && locNode.order() < rmtNode.order()) {
                if (log.isInfoEnabled()) {
                    log.info("Received incoming connection from remote node while " + "connecting to this node, rejecting [locNode=" + locNode.id() + ", locNodeOrder=" + locNode.order() + ", rmtNode=" + rmtNode.id() + ", rmtNodeOrder=" + rmtNode.order() + ']');
                }
                ses.send(new RecoveryLastReceivedMessage(ALREADY_CONNECTED));
            } else {
                boolean reserved = recoveryDesc.tryReserve(msg0.connectCount(), new ConnectClosure(ses, recoveryDesc, rmtNode, connKey, msg0, true, fut));
                GridTcpNioCommunicationClient client = null;
                if (reserved)
                    client = connected(recoveryDesc, ses, rmtNode, msg0.received(), true, true);
                if (oldFut instanceof ConnectionRequestFuture && !oldFut.isDone())
                    oldFut.onDone(client);
            }
        }
    }
}
Also used : ClusterNode(org.apache.ignite.cluster.ClusterNode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) CommunicationTcpUtils.usePairedConnections(org.apache.ignite.spi.communication.tcp.internal.CommunicationTcpUtils.usePairedConnections) GridNioSession(org.apache.ignite.internal.util.nio.GridNioSession) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) NEED_WAIT(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.NEED_WAIT) GridNioSessionMetaKey(org.apache.ignite.internal.util.nio.GridNioSessionMetaKey) DiscoverySpi(org.apache.ignite.spi.discovery.DiscoverySpi) CONSISTENT_ID_META(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONSISTENT_ID_META) FailureProcessor(org.apache.ignite.internal.processors.failure.FailureProcessor) GridTcpNioCommunicationClient(org.apache.ignite.internal.util.nio.GridTcpNioCommunicationClient) Channel(java.nio.channels.Channel) GridNioMessageTracker(org.apache.ignite.internal.util.nio.GridNioMessageTracker) NOOP(org.apache.ignite.spi.communication.tcp.internal.CommunicationTcpUtils.NOOP) FailureType(org.apache.ignite.failure.FailureType) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) NodeIdMessage(org.apache.ignite.spi.communication.tcp.messages.NodeIdMessage) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) SpanTags(org.apache.ignite.internal.processors.tracing.SpanTags) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) UUID(java.util.UUID) RecoveryLastReceivedMessage(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage) AttributeNames(org.apache.ignite.spi.communication.tcp.AttributeNames) CountDownLatch(java.util.concurrent.CountDownLatch) Nullable(org.jetbrains.annotations.Nullable) MTC(org.apache.ignite.internal.processors.tracing.MTC) TraceableMessagesTable.traceName(org.apache.ignite.internal.processors.tracing.messages.TraceableMessagesTable.traceName) CHANNEL_FUT_META(org.apache.ignite.spi.communication.tcp.internal.GridNioServerWrapper.CHANNEL_FUT_META) Message(org.apache.ignite.plugin.extensions.communication.Message) GridCommunicationClient(org.apache.ignite.internal.util.nio.GridCommunicationClient) IgniteProductVersion(org.apache.ignite.lang.IgniteProductVersion) NODE_STOPPING(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.NODE_STOPPING) ALREADY_CONNECTED(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.ALREADY_CONNECTED) CommunicationListener(org.apache.ignite.spi.communication.CommunicationListener) TcpCommunicationMetricsListener(org.apache.ignite.spi.communication.tcp.TcpCommunicationMetricsListener) Span(org.apache.ignite.internal.processors.tracing.Span) GridSelectorNioSessionImpl(org.apache.ignite.internal.util.nio.GridSelectorNioSessionImpl) U(org.apache.ignite.internal.util.typedef.internal.U) IgniteLogger(org.apache.ignite.IgniteLogger) Function(java.util.function.Function) Supplier(java.util.function.Supplier) IgniteDiscoverySpi(org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi) LT(org.apache.ignite.internal.util.typedef.internal.LT) ClusterNode(org.apache.ignite.cluster.ClusterNode) FailureContext(org.apache.ignite.failure.FailureContext) CONN_IDX_META(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONN_IDX_META) Ignite(org.apache.ignite.Ignite) MAX_CONN_PER_NODE(org.apache.ignite.spi.communication.tcp.internal.GridNioServerWrapper.MAX_CONN_PER_NODE) SES_FUT_META(org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationConnectionCheckFuture.SES_FUT_META) HandshakeMessage(org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage) GridNioServerListenerAdapter(org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi) UNKNOWN_NODE(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage.UNKNOWN_NODE) GridNioRecoveryDescriptor(org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor) HandshakeWaitMessage(org.apache.ignite.spi.communication.tcp.messages.HandshakeWaitMessage) RecoveryLastReceivedMessage(org.apache.ignite.spi.communication.tcp.messages.RecoveryLastReceivedMessage) GridCommunicationClient(org.apache.ignite.internal.util.nio.GridCommunicationClient) GridTcpNioCommunicationClient(org.apache.ignite.internal.util.nio.GridTcpNioCommunicationClient) HandshakeMessage(org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage) NodeIdMessage(org.apache.ignite.spi.communication.tcp.messages.NodeIdMessage) DiscoverySpi(org.apache.ignite.spi.discovery.DiscoverySpi) IgniteDiscoverySpi(org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi) GridNioRecoveryDescriptor(org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) UUID(java.util.UUID) IgniteDiscoverySpi(org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

Channel (java.nio.channels.Channel)2 UUID (java.util.UUID)2 Function (java.util.function.Function)2 Supplier (java.util.function.Supplier)2 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)2 IgniteLogger (org.apache.ignite.IgniteLogger)2 ClusterNode (org.apache.ignite.cluster.ClusterNode)2 IgniteInternalFuture (org.apache.ignite.internal.IgniteInternalFuture)2 GridFutureAdapter (org.apache.ignite.internal.util.future.GridFutureAdapter)2 GridCommunicationClient (org.apache.ignite.internal.util.nio.GridCommunicationClient)2 GridNioRecoveryDescriptor (org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor)2 GridNioSession (org.apache.ignite.internal.util.nio.GridNioSession)2 GridNioSessionMetaKey (org.apache.ignite.internal.util.nio.GridNioSessionMetaKey)2 GridSelectorNioSessionImpl (org.apache.ignite.internal.util.nio.GridSelectorNioSessionImpl)2 GridTcpNioCommunicationClient (org.apache.ignite.internal.util.nio.GridTcpNioCommunicationClient)2 U (org.apache.ignite.internal.util.typedef.internal.U)2 Message (org.apache.ignite.plugin.extensions.communication.Message)2 CommunicationListener (org.apache.ignite.spi.communication.CommunicationListener)2 AttributeNames (org.apache.ignite.spi.communication.tcp.AttributeNames)2 CONN_IDX_META (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.CONN_IDX_META)2