ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [26/38] incubator-ignite git commit: Added missing clientMode configuration param.
Date Tue, 28 Apr 2015 14:30:39 GMT
Added missing clientMode configuration param.


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

Branch: refs/heads/ignite-728
Commit: 6473c977929a89eaadc8e99bea77026f0d25dc79
Parents: f6e2ef7
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Apr 28 16:31:56 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Apr 28 16:31:56 2015 +0700

----------------------------------------------------------------------
 .../internal/visor/node/VisorBasicConfiguration.java     | 11 +++++++++++
 .../commands/config/VisorConfigurationCommand.scala      |  1 +
 .../src/main/scala/org/apache/ignite/visor/visor.scala   | 11 +++++++++++
 3 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6473c977/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
index a3b6052..366f5f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
@@ -54,6 +54,9 @@ public class VisorBasicConfiguration implements Serializable {
     /** Deployment Mode. */
     private Object deployMode;
 
+    /** Client mode flag. */
+    private Boolean clientMode;
+
     /** Whether this node daemon or not. */
     private boolean daemon;
 
@@ -110,6 +113,7 @@ public class VisorBasicConfiguration implements Serializable {
         cfg.nodeId = ignite.localNode().id();
         cfg.marsh = compactClass(c.getMarshaller());
         cfg.deployMode = compactObject(c.getDeploymentMode());
+        cfg.clientMode = c.isClientMode();
         cfg.daemon = boolValue(IGNITE_DAEMON, c.isDaemon());
         cfg.jmxRemote = ignite.isJmxRemoteEnabled();
         cfg.restart = ignite.isRestartEnabled();
@@ -171,6 +175,13 @@ public class VisorBasicConfiguration implements Serializable {
     }
 
     /**
+     * @return Client mode flag.
+     */
+    public Boolean clientMode() {
+        return clientMode;
+    }
+
+    /**
      * @return Whether this node daemon or not.
      */
     public boolean daemon() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6473c977/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
index 447667a..0716836 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
@@ -203,6 +203,7 @@ class VisorConfigurationCommand {
             cmnT += ("Node ID", safe(basic.nodeId()))
             cmnT += ("Marshaller", basic.marshaller())
             cmnT += ("Deployment mode", safe(basic.deploymentMode()))
+            cmnT += ("ClientMode", javaBoolToStr(basic.clientMode()))
             cmnT += ("Daemon", bool2Str(basic.daemon()))
             cmnT += ("Remote JMX", bool2Str(basic.jmxRemote()))
             cmnT += ("Restart", bool2Str(basic.restart()))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6473c977/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index b9981f1..976ac3a 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -45,6 +45,7 @@ import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.jetbrains.annotations.Nullable
 
 import java.io._
+import java.lang.{Boolean => JavaBoolean}
 import java.net._
 import java.text._
 import java.util.concurrent._
@@ -1020,6 +1021,16 @@ object visor extends VisorTag {
     def bool2Str(bool: Boolean) = if (bool) "on" else "off"
 
     /**
+     * Converts `java.lang.Boolean` to 'on'/'off' string.
+     *
+     * @param bool Boolean value.
+     * @param ifNull Default value in case if `bool` is `null`.
+     * @return String.
+     */
+    def javaBoolToStr(bool: JavaBoolean, ifNull: Boolean = false) =
+        bool2Str(if (bool == null) ifNull else bool.booleanValue())
+
+    /**
      * Reconstructs string presentation for given argument.
      *
      * @param arg Argument to reconstruct.


Mime
View raw message