You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2017/02/27 15:23:49 UTC

qpid-jms git commit: QPIDJMS-267: tweak new option name slightly

Repository: qpid-jms
Updated Branches:
  refs/heads/master 44be741f5 -> fed7badb3


QPIDJMS-267: tweak new option name slightly


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

Branch: refs/heads/master
Commit: fed7badb35ac22645530f485efcc4a3c53df61ac
Parents: 44be741
Author: Robert Gemmell <ro...@apache.org>
Authored: Mon Feb 27 15:11:27 2017 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Mon Feb 27 15:11:27 2017 +0000

----------------------------------------------------------------------
 .../jms/provider/failover/FailoverProvider.java   | 14 +++++++-------
 .../provider/failover/FailoverProviderTest.java   | 18 +++++++++---------
 ...AmqpOpenProvidedServerListIntegrationTest.java |  6 +++---
 qpid-jms-docs/Configuration.md                    |  2 +-
 4 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/fed7badb/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
index 45d6087..0196451 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
@@ -123,7 +123,7 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
     private int startupMaxReconnectAttempts = DEFAULT_STARTUP_MAX_RECONNECT_ATTEMPTS;
     private int warnAfterReconnectAttempts = DEFAULT_WARN_AFTER_RECONNECT_ATTEMPTS;
 
-    private FailoverServerListBehaviour amqpOpenServerListBehaviour = FailoverServerListBehaviour.REPLACE;
+    private FailoverServerListAction amqpOpenServerListAction = FailoverServerListAction.REPLACE;
 
     public FailoverProvider(Map<String, String> nestedOptions) {
         this(null, nestedOptions);
@@ -865,7 +865,7 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
                 if (!closingConnection.get() && !closed.get() && !failed.get()) {
 
                     List<URI> newRemotes = new ArrayList<URI>(discovered);
-                    switch (amqpOpenServerListBehaviour) {
+                    switch (amqpOpenServerListAction) {
                         case ADD:
                             try {
                                 uris.addAll(discovered);
@@ -1042,12 +1042,12 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
         return this.requestTimeout;
     }
 
-    public String getAmqpOpenServerListBehaviour() {
-        return amqpOpenServerListBehaviour.toString();
+    public String getAmqpOpenServerListAction() {
+        return amqpOpenServerListAction.toString();
     }
 
-    public void setAmqpOpenServerListBehaviour(String amqpOpenServerListBehaviour) {
-        this.amqpOpenServerListBehaviour = FailoverServerListBehaviour.valueOf(amqpOpenServerListBehaviour.toUpperCase(Locale.ENGLISH));
+    public void setAmqpOpenServerListAction(String amqpOpenServerListAction) {
+        this.amqpOpenServerListAction = FailoverServerListAction.valueOf(amqpOpenServerListAction.toUpperCase(Locale.ENGLISH));
     }
 
     public Map<String, String> getNestedOptions() {
@@ -1268,7 +1268,7 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
         }
     }
 
-    private static enum FailoverServerListBehaviour {
+    private static enum FailoverServerListAction {
         ADD, REPLACE, IGNORE
     };
 }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/fed7badb/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
index 1120285..031d668 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
@@ -421,26 +421,26 @@ public class FailoverProviderTest extends FailoverProviderTestSupport {
     }
 
     @Test(timeout = 30000)
-    public void testAmqpOpenServerListBehaviourDefault() {
+    public void testAmqpOpenServerListActionDefault() {
         provider = new FailoverProvider(uris);
-        assertEquals("REPLACE", provider.getAmqpOpenServerListBehaviour());
+        assertEquals("REPLACE", provider.getAmqpOpenServerListAction());
     }
 
     @Test(timeout = 30000)
-    public void testSetGetAmqpOpenServerListBehaviour() {
+    public void testSetGetAmqpOpenServerListAction() {
         provider = new FailoverProvider(uris);
-        String behaviour = "ADD";
-        assertFalse(behaviour.equals(provider.getAmqpOpenServerListBehaviour()));
+        String action = "ADD";
+        assertFalse(action.equals(provider.getAmqpOpenServerListAction()));
 
-        provider.setAmqpOpenServerListBehaviour(behaviour);
-        assertEquals(behaviour, provider.getAmqpOpenServerListBehaviour());
+        provider.setAmqpOpenServerListAction(action);
+        assertEquals(action, provider.getAmqpOpenServerListAction());
     }
 
     @Test(timeout = 30000)
-    public void testSetInvalidAmqpOpenServerListBehaviourThrowsIAE() {
+    public void testSetInvalidAmqpOpenServerListActionThrowsIAE() {
         provider = new FailoverProvider(uris);
         try {
-            provider.setAmqpOpenServerListBehaviour("invalid");
+            provider.setAmqpOpenServerListAction("invalid");
             fail("no exception was thrown");
         } catch (IllegalArgumentException iae) {
             // Expected

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/fed7badb/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverWithAmqpOpenProvidedServerListIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverWithAmqpOpenProvidedServerListIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverWithAmqpOpenProvidedServerListIntegrationTest.java
index 4f6e70b..4490727 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverWithAmqpOpenProvidedServerListIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverWithAmqpOpenProvidedServerListIntegrationTest.java
@@ -110,9 +110,9 @@ public class FailoverWithAmqpOpenProvidedServerListIntegrationTest extends QpidJ
 
             String failoverParams = null;
             if (replace) {
-                failoverParams = "?failover.maxReconnectAttempts=10&failover.amqpOpenServerListBehaviour=REPLACE";
+                failoverParams = "?failover.maxReconnectAttempts=10&failover.amqpOpenServerListAction=REPLACE";
             } else {
-                failoverParams = "?failover.maxReconnectAttempts=10&failover.amqpOpenServerListBehaviour=ADD";
+                failoverParams = "?failover.maxReconnectAttempts=10&failover.amqpOpenServerListAction=ADD";
             }
 
             // We only give it the primary/dropping peer details. It can only connect to the backup
@@ -253,7 +253,7 @@ public class FailoverWithAmqpOpenProvidedServerListIntegrationTest extends QpidJ
             // Expect the authentication as soon as the connection object is created
             primaryPeer.expectSaslAnonymous();
 
-            String failoverParams = "?failover.maxReconnectAttempts=10&failover.amqpOpenServerListBehaviour=IGNORE";
+            String failoverParams = "?failover.maxReconnectAttempts=10&failover.amqpOpenServerListAction=IGNORE";
 
             // We only give it the primary peer details. It can only connect to the backup
             // peer by identifying the details in the announced failover-server-list.

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/fed7badb/qpid-jms-docs/Configuration.md
----------------------------------------------------------------------
diff --git a/qpid-jms-docs/Configuration.md b/qpid-jms-docs/Configuration.md
index f44c89c..0ff2e96 100644
--- a/qpid-jms-docs/Configuration.md
+++ b/qpid-jms-docs/Configuration.md
@@ -223,7 +223,7 @@ The complete set of configuration options for failover is listed below:
 + **failover.startupMaxReconnectAttempts** For a client that has never connected to a remote peer before this option control how many attempts are made to connect before reporting the connection as failed.  The default is to use the value of maxReconnectAttempts.
 + **failover.warnAfterReconnectAttempts** Controls how often the client will log a message indicating that failover reconnection is being attempted.  The default is to log every 10 connection attempts.
 + **failover.randomize** When true the set of failover URIs is randomly shuffled prior to attempting to connect to one of them.  This can help to distribute client connections more evenly across multiple remote peers.  The default value is false.
-+ **failover.amqpOpenServerListBehaviour** Controls how the failover transport behaves when the connection Open frame from the remote peer provides a list of failover hosts to the client.  This option accepts one of three values; REPLACE, ADD, or IGNORE (default is REPLACE).  If REPLACE is configured then all failover URIs other than the one for the current server are replaced with those provided by the remote peer.  If ADD is configured then the URIs provided by the remote are added to the existing set of failover URIs, with de-duplication.  If IGNORE is configured than any updates from the remote are dropped and no changes are made the the set of failover URIs in use.
++ **failover.amqpOpenServerListAction** Controls how the failover transport behaves when the connection Open frame from the remote peer provides a list of failover hosts to the client.  This option accepts one of three values; REPLACE, ADD, or IGNORE (default is REPLACE).  If REPLACE is configured then all failover URIs other than the one for the current server are replaced with those provided by the remote peer.  If ADD is configured then the URIs provided by the remote are added to the existing set of failover URIs, with de-duplication.  If IGNORE is configured than any updates from the remote are dropped and no changes are made the the set of failover URIs in use.
 
 The failover URI also supports defining 'nested' options as a means of specifying AMQP and transport option values applicable to all the individual nested broker URI's, which can be useful to avoid repetition. This is accomplished using the same "transport." and "amqp." URI options outlined earlier for a non-failover broker URI but prefixed with *failover.nested.*. For example, to apply the same value for the *amqp.vhost* option to every broker connected to you might have a URI like:
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org