ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: IGNITE-2761: Optimized "daemon" flag resolution for TcpDiscoveryNode.
Date Fri, 04 Mar 2016 09:26:31 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 1c4cfb686 -> ee817dd73


IGNITE-2761: Optimized "daemon" flag resolution for TcpDiscoveryNode.


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

Branch: refs/heads/master
Commit: ee817dd73694869e6f1262c9656d46f531dd547e
Parents: 1c4cfb6
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Mar 4 12:25:31 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Mar 4 12:25:31 2016 +0300

----------------------------------------------------------------------
 .../discovery/tcp/internal/TcpDiscoveryNode.java    | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ee817dd7/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
index 0be0bea..d1fbecf 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
@@ -142,6 +142,14 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements
Cluste
     @GridToStringExclude
     private transient boolean cacheCli;
 
+    /** Daemon node initialization flag. */
+    @GridToStringExclude
+    private transient volatile boolean daemonInit;
+
+    /** Daemon node flag. */
+    @GridToStringExclude
+    private transient boolean daemon;
+
     /**
      * Public default no-arg constructor for {@link Externalizable} interface.
      */
@@ -374,7 +382,13 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements
Cluste
 
     /** {@inheritDoc} */
     @Override public boolean isDaemon() {
-        return "true".equalsIgnoreCase((String)attribute(ATTR_DAEMON));
+        if (!daemonInit) {
+            daemon = "true".equalsIgnoreCase((String)attribute(ATTR_DAEMON));
+
+            daemonInit = true;
+        }
+
+        return daemon;
     }
 
     /** {@inheritDoc} */


Mime
View raw message