Examples of GridTcpDiscoverySpiState


Examples of org.gridgain.grid.spi.discovery.tcp.internal.GridTcpDiscoverySpiState

        assert type > 0;
        assert node != null;

        GridDiscoverySpiListener lsnr = this.lsnr;

        GridTcpDiscoverySpiState spiState = spiStateCopy();

        if (lsnr != null && node.visible() && (spiState == CONNECTED || spiState == DISCONNECTING)) {
            Collection<GridNode> top = new ArrayList<GridNode>(F.view(ring.allNodes(), VISIBLE_NODES));

            Map<Long, Collection<GridNode>> hist = updateTopologyHistory(topVer, top);
View Full Code Here

Examples of org.gridgain.grid.spi.discovery.tcp.internal.GridTcpDiscoverySpiState

    /**
     * @return Spi state copy.
     */
    private GridTcpDiscoverySpiState spiStateCopy() {
        GridTcpDiscoverySpiState state;

        synchronized (mux) {
            state = spiState;
        }

View Full Code Here

Examples of org.gridgain.grid.spi.discovery.tcp.internal.GridTcpDiscoverySpiState

            onBeforeMessageSentAcrossRing(msg);

            Collection<GridTcpDiscoveryNode> failedNodes;

            GridTcpDiscoverySpiState state;

            synchronized (mux) {
                failedNodes = new ArrayList<>(GridTcpDiscoverySpi.this.failedNodes);

                state = spiState;
View Full Code Here

Examples of org.gridgain.grid.spi.discovery.tcp.internal.GridTcpDiscoverySpiState

                            // Send receipt back.
                            writeToSocket(sock, RES_OK);

                            boolean ignored = false;

                            GridTcpDiscoverySpiState state = null;

                            synchronized (mux) {
                                if (spiState == CONNECTING) {
                                    joinRes.set(msg);

                                    spiState = DUPLICATE_ID;

                                    mux.notifyAll();
                                }
                                else {
                                    ignored = true;

                                    state = spiState;
                                }
                            }

                            if (ignored && log.isDebugEnabled())
                                log.debug("Duplicate ID message has been ignored [msg=" + msg +
                                    ", spiState=" + state + ']');

                            continue;
                        }
                        else if (msg instanceof GridTcpDiscoveryAuthFailedMessage) {
                            // Send receipt back.
                            writeToSocket(sock, RES_OK);

                            boolean ignored = false;

                            GridTcpDiscoverySpiState state = null;

                            synchronized (mux) {
                                if (spiState == CONNECTING) {
                                    joinRes.set(msg);

                                    spiState = AUTH_FAILED;

                                    mux.notifyAll();
                                }
                                else {
                                    ignored = true;

                                    state = spiState;
                                }
                            }

                            if (ignored && log.isDebugEnabled())
                                log.debug("Auth failed message has been ignored [msg=" + msg +
                                    ", spiState=" + state + ']');

                            continue;
                        }
                        else if (msg instanceof GridTcpDiscoveryCheckFailedMessage) {
                            // Send receipt back.
                            writeToSocket(sock, RES_OK);

                            boolean ignored = false;

                            GridTcpDiscoverySpiState state = null;

                            synchronized (mux) {
                                if (spiState == CONNECTING) {
                                    joinRes.set(msg);

                                    spiState = CHECK_FAILED;

                                    mux.notifyAll();
                                }
                                else {
                                    ignored = true;

                                    state = spiState;
                                }
                            }

                            if (ignored && log.isDebugEnabled())
                                log.debug("Check failed message has been ignored [msg=" + msg +
                                    ", spiState=" + state + ']');

                            continue;
                        }
                        else if (msg instanceof GridTcpDiscoveryLoopbackProblemMessage) {
                            // Send receipt back.
                            writeToSocket(sock, RES_OK);

                            boolean ignored = false;

                            GridTcpDiscoverySpiState state = null;

                            synchronized (mux) {
                                if (spiState == CONNECTING) {
                                    joinRes.set(msg);
View Full Code Here

Examples of org.gridgain.grid.spi.discovery.tcp.internal.GridTcpDiscoverySpiState

        @SuppressWarnings({"IfMayBeConditional"})
        private void processJoinRequestMessage(GridTcpDiscoveryJoinRequestMessage msg) throws IOException {
            assert msg != null;
            assert !msg.responded();

            GridTcpDiscoverySpiState state = spiStateCopy();

            if (state == CONNECTED) {
                writeToSocket(sock, RES_OK);

                if (log.isDebugEnabled())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.