ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: ignite-890: fixes after the review
Date Thu, 16 Jul 2015 06:02:13 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-890 b601a62a3 -> 5c5581290


ignite-890: fixes after the review


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

Branch: refs/heads/ignite-890
Commit: 5c5581290aba6d2958aa410d1f126f77facc626c
Parents: b601a62
Author: Denis Magda <dmagda@gridgain.com>
Authored: Thu Jul 16 09:01:45 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Thu Jul 16 09:01:45 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/spi/IgniteSpiAdapter.java | 26 +++++++++++---------
 .../org/apache/ignite/spi/IgniteSpiContext.java |  6 ++---
 .../communication/tcp/TcpCommunicationSpi.java  |  2 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c558129/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 df043dd..9bdf495 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
@@ -545,19 +545,17 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
 
     /**
      * @param obj Timeout object.
-     * @throws IgniteSpiException Thrown in case of any error.
      * @see IgniteSpiContext#addTimeoutObject(IgniteSpiTimeoutObject)
      */
-    protected void addTimeoutObject(IgniteSpiTimeoutObject obj) throws IgniteSpiException
{
+    protected void addTimeoutObject(IgniteSpiTimeoutObject obj) {
         spiCtx.addTimeoutObject(obj);
     }
 
     /**
      * @param obj Timeout object.
-     * @throws IgniteSpiException Thrown in case of any error.
      * @see IgniteSpiContext#removeTimeoutObject(IgniteSpiTimeoutObject)
      */
-    protected void removeTimeoutObject(IgniteSpiTimeoutObject obj) throws IgniteSpiException
{
+    protected void removeTimeoutObject(IgniteSpiTimeoutObject obj) {
         spiCtx.removeTimeoutObject(obj);
     }
 
@@ -766,19 +764,23 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
         }
 
         /** {@inheritDoc} */
-        @Override public void addTimeoutObject(IgniteSpiTimeoutObject obj) throws IgniteSpiException
{
-            if (!(ignite instanceof IgniteKernal))
-                throw new IgniteSpiException("Wrong Ignite instance is set: " + ignite);
+        @Override public void addTimeoutObject(IgniteSpiTimeoutObject obj) {
+            Ignite ignite0 = ignite;
 
-            ((IgniteKernal)ignite).context().timeout().addTimeoutObject(new GridSpiTimeoutObject(obj));
+            if (!(ignite0 instanceof IgniteKernal))
+                throw new IgniteSpiException("Wrong Ignite instance is set: " + ignite0);
+
+            ((IgniteKernal)ignite0).context().timeout().addTimeoutObject(new GridSpiTimeoutObject(obj));
         }
 
         /** {@inheritDoc} */
-        @Override public void removeTimeoutObject(IgniteSpiTimeoutObject obj) throws IgniteSpiException
{
-            if (!(ignite instanceof IgniteKernal))
-                throw new IgniteSpiException("Wrong Ignite instance is set: " + ignite);
+        @Override public void removeTimeoutObject(IgniteSpiTimeoutObject obj) {
+            Ignite ignite0 = ignite;
+
+            if (!(ignite0 instanceof IgniteKernal))
+                throw new IgniteSpiException("Wrong Ignite instance is set: " + ignite0);
 
-            ((IgniteKernal)ignite).context().timeout().removeTimeoutObject(new GridSpiTimeoutObject(obj));
+            ((IgniteKernal)ignite0).context().timeout().removeTimeoutObject(new GridSpiTimeoutObject(obj));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c558129/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
index addf63f..611702b 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
@@ -320,13 +320,11 @@ public interface IgniteSpiContext {
 
     /**
      * @param c Timeout object.
-     * @throws IgniteSpiException Thrown if any exception occurs.
      */
-    public void addTimeoutObject(IgniteSpiTimeoutObject c) throws IgniteSpiException;
+    public void addTimeoutObject(IgniteSpiTimeoutObject c);
 
     /**
      * @param c Timeout object.
-     * @throws IgniteSpiException Thrown if any exception occurs.
      */
-    public void removeTimeoutObject(IgniteSpiTimeoutObject c) throws IgniteSpiException;
+    public void removeTimeoutObject(IgniteSpiTimeoutObject c);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c558129/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 df7d098..b79ca55 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
@@ -2063,7 +2063,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                         client = null;
                     }
 
-                    onException("Handshake timeout (will retry with increased timeout) [timeout="
+ connTimeout0 +
+                    onException("Handshake timed out (will retry with increased timeout)
[timeout=" + connTimeout0 +
                         ", addr=" + addr + ']', e);
 
                     if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c558129/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index bca2d98..6587006 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -338,7 +338,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 
         clientMsgWorkers.clear();
 
-        utilityPool.shutdownNow();
+        IgniteUtils.shutdownNow(ServerImpl.class, utilityPool, log);
 
         U.interrupt(statsPrinter);
         U.join(statsPrinter, log);


Mime
View raw message