ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/3] incubator-ignite git commit: ignite-752: added manualFailureDetection setup flag
Date Wed, 15 Jul 2015 14:12:02 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-752 de7e06f3f -> 1b6005a50


ignite-752: added manualFailureDetection setup flag


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

Branch: refs/heads/ignite-752
Commit: 1a7421e67b9fc743c2213e6381f64c9e646030f2
Parents: de7e06f
Author: Denis Magda <dmagda@gridgain.com>
Authored: Wed Jul 15 09:15:32 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Wed Jul 15 09:15:32 2015 +0300

----------------------------------------------------------------------
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a7421e6/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 7663fe6..4240d6a 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
@@ -221,17 +221,17 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     protected TcpDiscoveryIpFinder ipFinder;
 
     /** Socket operations timeout. */
-    protected long sockTimeout; // Must be initialized in the constructor of child class.
+    private long sockTimeout; // Must be initialized in the constructor of child class.
 
     /** Message acknowledgement timeout. */
-    protected long ackTimeout; // Must be initialized in the constructor of child class.
+    private long ackTimeout; // Must be initialized in the constructor of child class.
 
     /** Network timeout. */
-    protected long netTimeout = DFLT_NETWORK_TIMEOUT;
+    private long netTimeout = DFLT_NETWORK_TIMEOUT;
 
     /** Join timeout. */
     @SuppressWarnings("RedundantFieldInitialization")
-    protected long joinTimeout = DFLT_JOIN_TIMEOUT;
+    private long joinTimeout = DFLT_JOIN_TIMEOUT;
 
     /** Thread priority for all threads started by SPI. */
     protected int threadPri = DFLT_THREAD_PRI;
@@ -283,14 +283,14 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
 
     /** Reconnect attempts count. */
     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
-    protected int reconCnt = DFLT_RECONNECT_CNT;
+    private int reconCnt = DFLT_RECONNECT_CNT;
 
     /** Statistics print frequency. */
     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized", "RedundantFieldInitialization"})
     protected long statsPrintFreq = DFLT_STATS_PRINT_FREQ;
 
     /** Maximum message acknowledgement timeout. */
-    protected long maxAckTimeout = DFLT_MAX_ACK_TIMEOUT;
+    private long maxAckTimeout = DFLT_MAX_ACK_TIMEOUT;
 
     /** Max heartbeats count node can miss without initiating status check. */
     protected int maxMissedHbs = DFLT_MAX_MISSED_HEARTBEATS;
@@ -327,6 +327,9 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     /** */
     private boolean forceSrvMode;
 
+    /** User manually set one of the failure detection timeouts. Failure detection threshold
will not be used. */
+    private boolean manualFailureDetectionSetup;
+
     /** {@inheritDoc} */
     @Override public String getSpiState() {
         return impl.getSpiState();
@@ -499,6 +502,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     @IgniteSpiConfiguration(optional = true)
     public TcpDiscoverySpi setReconnectCount(int reconCnt) {
         this.reconCnt = reconCnt;
+        manualFailureDetectionSetup = true;
 
         return this;
     }
@@ -525,6 +529,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     @IgniteSpiConfiguration(optional = true)
     public TcpDiscoverySpi setMaxAckTimeout(long maxAckTimeout) {
         this.maxAckTimeout = maxAckTimeout;
+        manualFailureDetectionSetup = true;
 
         return this;
     }
@@ -697,6 +702,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     @IgniteSpiConfiguration(optional = true)
     public TcpDiscoverySpi setSocketTimeout(long sockTimeout) {
         this.sockTimeout = sockTimeout;
+        manualFailureDetectionSetup = true;
 
         return this;
     }
@@ -714,6 +720,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     @IgniteSpiConfiguration(optional = true)
     public TcpDiscoverySpi setAckTimeout(long ackTimeout) {
         this.ackTimeout = ackTimeout;
+        manualFailureDetectionSetup = true;
 
         return this;
     }
@@ -728,6 +735,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     @IgniteSpiConfiguration(optional = true)
     public TcpDiscoverySpi setNetworkTimeout(long netTimeout) {
         this.netTimeout = netTimeout;
+        manualFailureDetectionSetup = true;
 
         return this;
     }


Mime
View raw message