activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: small improvement on CLI / ARTEMIS-19
Date Fri, 12 Jun 2015 02:18:44 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master d3a960b28 -> 145fc7f82


small improvement on CLI / ARTEMIS-19


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/145fc7f8
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/145fc7f8
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/145fc7f8

Branch: refs/heads/master
Commit: 145fc7f82c1c5513403df4af90e1e2dbe24586a0
Parents: d3a960b
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Thu Jun 11 21:55:51 2015 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Jun 11 21:55:51 2015 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/cli/commands/Create.java   | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/145fc7f8/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 248f55b..c015139 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -107,8 +107,8 @@ public class Create extends InputAbstract
    @Option(name = "--max-hops", description = "Number of hops on the cluster configuration")
    int maxHops = 0;
 
-   @Option(name = "--message-load-balancing", description = "What kind of message load balancing
to use for clustered configurations. Can be ON_DEMAND, STRICT, or OFF. (Default: ON_DEMAND)")
-   String messageLoadBalancing = MessageLoadBalancingType.ON_DEMAND.toString();
+   @Option(name = "--message-load-balancing", description = "Load balancing policy on cluster.
[ON_DEMAND (default) | STRICT | OFF]")
+   MessageLoadBalancingType messageLoadBalancing = MessageLoadBalancingType.ON_DEMAND;
 
    @Option(name = "--replicated", description = "Enable broker replication")
    boolean replicated = false;
@@ -180,12 +180,12 @@ public class Create extends InputAbstract
       this.portOffset = portOffset;
    }
 
-   public String getMessageLoadBalancing()
+   public MessageLoadBalancingType getMessageLoadBalancing()
    {
       return messageLoadBalancing;
    }
 
-   public void setMessageLoadBalancing(String messageLoadBalancing)
+   public void setMessageLoadBalancing(MessageLoadBalancingType messageLoadBalancing)
    {
       this.messageLoadBalancing = messageLoadBalancing;
    }
@@ -486,10 +486,7 @@ public class Create extends InputAbstract
       filters.put("${data.dir}", data);
       filters.put("${max-hops}", String.valueOf(maxHops));
 
-      // validate message-load-balancing
-      Enum.valueOf(MessageLoadBalancingType.class, messageLoadBalancing);
-
-      filters.put("${message-load-balancing}", messageLoadBalancing);
+      filters.put("${message-load-balancing}", messageLoadBalancing.toString());
       filters.put("${user}", getUser());
       filters.put("${password}", getPassword());
       filters.put("${role}", getRole());


Mime
View raw message