Quantcast

[1/2] activemq-artemis git commit: ARTEMIS-914 use defaults for ReplicaPolicy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1/2] activemq-artemis git commit: ARTEMIS-914 use defaults for ReplicaPolicy

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0386263c8 -> 9b0447be8


ARTEMIS-914 use defaults for ReplicaPolicy


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

Branch: refs/heads/master
Commit: 22c6a81135c3a4be17d7990ff2c3c54029dbdd2f
Parents: 0386263
Author: Justin Bertram <[hidden email]>
Authored: Wed Jan 11 11:40:13 2017 -0600
Committer: Clebert Suconic <[hidden email]>
Committed: Wed Jan 11 14:18:16 2017 -0500

----------------------------------------------------------------------
 .../artemis/core/server/cluster/ha/ReplicaPolicy.java     |  6 ++++++
 .../artemis/core/server/cluster/ha/ReplicatedPolicy.java  | 10 ++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/22c6a811/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
index 89e7ab8..68db06e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
@@ -47,6 +47,12 @@ public class ReplicaPolicy extends BackupPolicy {
       this.networkHealthCheck = networkHealthCheck;
    }
 
+   public ReplicaPolicy(final NetworkHealthCheck networkHealthCheck,
+                        ReplicatedPolicy replicatedPolicy) {
+      this.networkHealthCheck = networkHealthCheck;
+      this.replicatedPolicy = replicatedPolicy;
+   }
+
    public ReplicaPolicy(String clusterName,
                         int maxSavedReplicatedJournalsSize,
                         String groupName,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/22c6a811/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
index f743219..82df79c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
@@ -48,7 +48,7 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> {
    private final NetworkHealthCheck networkHealthCheck;
 
    public ReplicatedPolicy(NetworkHealthCheck networkHealthCheck) {
-      replicaPolicy = new ReplicaPolicy(clusterName, -1, groupName, this, networkHealthCheck);
+      replicaPolicy = new ReplicaPolicy(networkHealthCheck, this);
       this.networkHealthCheck = networkHealthCheck;
    }
 
@@ -122,7 +122,13 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> {
 
    public ReplicaPolicy getReplicaPolicy() {
       if (replicaPolicy == null) {
-         replicaPolicy = new ReplicaPolicy(clusterName, -1, groupName, this, networkHealthCheck);
+         replicaPolicy = new ReplicaPolicy(networkHealthCheck, this);
+         if (clusterName != null && clusterName.length() > 0) {
+            replicaPolicy.setClusterName(clusterName);
+         }
+         if (groupName != null && groupName.length() > 0) {
+            replicaPolicy.setGroupName(groupName);
+         }
       }
       return replicaPolicy;
    }

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[2/2] activemq-artemis git commit: This closes #957

clebertsuconic-2
This closes #957


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

Branch: refs/heads/master
Commit: 9b0447be836a99ae80f208983709b4eba1196361
Parents: 0386263 22c6a81
Author: Clebert Suconic <[hidden email]>
Authored: Wed Jan 11 14:18:17 2017 -0500
Committer: Clebert Suconic <[hidden email]>
Committed: Wed Jan 11 14:18:17 2017 -0500

----------------------------------------------------------------------
 .../artemis/core/server/cluster/ha/ReplicaPolicy.java     |  6 ++++++
 .../artemis/core/server/cluster/ha/ReplicatedPolicy.java  | 10 ++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


Loading...