ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [39/50] [abbrv] incubator-ignite git commit: # ignite-sprint-3 moved 'isNodeStopping' to SpiAdapter
Date Fri, 03 Apr 2015 15:31:36 GMT
# ignite-sprint-3 moved 'isNodeStopping' to SpiAdapter


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d2d6def5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d2d6def5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d2d6def5

Branch: refs/heads/ignite-639
Commit: d2d6def52dd469869592ee2fd7b9df2a83ba4812
Parents: 3af6914
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Apr 3 16:14:24 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Apr 3 16:14:24 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java | 7 +++++++
 .../ignite/spi/communication/tcp/TcpCommunicationSpi.java     | 6 +++---
 .../org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java  | 7 -------
 3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2d6def5/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index bb66872..2bd262c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -357,6 +357,13 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
     }
 
     /**
+     * @return {@code True} if node is stopping.
+     */
+    protected final boolean isNodeStopping() {
+        return spiCtx.isStopping();
+    }
+
+    /**
      * @return {@code true} if this check is optional.
      */
     private boolean checkOptional() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2d6def5/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 0ab0cf2..613ff64 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -257,7 +257,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                         clients.remove(id, rmv)) {
                         rmv.forceClose();
 
-                        if (!getSpiContext().isStopping()) {
+                        if (!isNodeStopping()) {
                             GridNioRecoveryDescriptor recoveryData = ses.recoveryDescriptor();
 
                             if (recoveryData != null) {
@@ -1460,7 +1460,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
 
     /** {@inheritDoc} */
     @Override public void spiStop() throws IgniteSpiException {
-        assert getSpiContext().isStopping();
+        assert isNodeStopping();
 
         unregisterMBean();
 
@@ -1619,7 +1619,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
             GridCommunicationClient client = clients.get(nodeId);
 
             if (client == null) {
-                if (getSpiContext().isStopping())
+                if (isNodeStopping())
                     throw new IgniteSpiException("Node is stopping.");
 
                 // Do not allow concurrent connects.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2d6def5/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index d5c05f7..cd18370 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1060,13 +1060,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
     }
 
     /**
-     * @return {@code True} if node is stopping.
-     */
-    private boolean isNodeStopping() {
-        return super.getSpiContext().isStopping();
-    }
-
-    /**
      * @throws IgniteSpiException If any error occurs.
      * @return {@code true} if IP finder contains local address.
      */


Mime
View raw message