You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by dr...@apache.org on 2015/08/17 18:54:36 UTC
[06/27] curator git commit: [CURATOR-160] Made Configurable optional.
Fix storingStatIn in GetConfigBuilderImpl.
[CURATOR-160] Made Configurable optional. Fix storingStatIn in GetConfigBuilderImpl.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/dbdcf2f1
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/dbdcf2f1
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/dbdcf2f1
Branch: refs/heads/CURATOR-215
Commit: dbdcf2f1cd2eae8d91d78619dd039c154b4aa52a
Parents: 4ec5ffe
Author: Ioannis Canellos <io...@gmail.com>
Authored: Fri Apr 17 12:57:28 2015 +0300
Committer: Scott Blum <dr...@apache.org>
Committed: Wed Aug 12 17:08:33 2015 -0400
----------------------------------------------------------------------
.../api/BackgroundStatConfigEnsembleable.java | 24 ++++++++++
.../api/BackgroundStatConfigurable.java | 24 ----------
.../api/BackgroundStatEnsembleable.java | 24 ++++++++++
.../curator/framework/api/Configurable.java | 2 +-
.../JoinBackgroundStatConfigEnsembleable.java | 30 ++++++++++++
.../api/JoinBackgroundStatConfigurable.java | 30 ------------
.../LeaveBackgroundStatConfigEnsembleable.java | 30 ++++++++++++
.../api/LeaveBackgroundStatConfigurable.java | 30 ------------
.../curator/framework/api/ReconfigBuilder.java | 6 +--
.../framework/imps/GetConfigBuilderImpl.java | 2 +-
.../framework/imps/ReconfigBuilderImpl.java | 48 ++++++++++----------
.../framework/imps/TestReconfiguration.java | 32 ++++++-------
12 files changed, 153 insertions(+), 129 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigEnsembleable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigEnsembleable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigEnsembleable.java
new file mode 100644
index 0000000..f109b0f
--- /dev/null
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigEnsembleable.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+public interface BackgroundStatConfigEnsembleable<T> extends
+ Configurable<BackgroundStatEnsembleable<T>>,
+ BackgroundStatEnsembleable<T> {
+}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigurable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigurable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigurable.java
deleted file mode 100644
index e46ba89..0000000
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatConfigurable.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.curator.framework.api;
-
-public interface BackgroundStatConfigurable<T> extends
- BackgroundStatable<Configurable<T>>,
- Configurable<T> {
-}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatEnsembleable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatEnsembleable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatEnsembleable.java
new file mode 100644
index 0000000..62f666d
--- /dev/null
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundStatEnsembleable.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+public interface BackgroundStatEnsembleable<T> extends
+ BackgroundStatable<Ensembleable<T>>,
+ Ensembleable<T> {
+}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/Configurable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/Configurable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/Configurable.java
index a47f9d0..39e2c0c 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/Configurable.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/Configurable.java
@@ -25,5 +25,5 @@ public interface Configurable<T> {
* @param config The version of the configuration.
* @throws Exception
*/
- Ensembleable<T> fromConfig(long config) throws Exception;
+ BackgroundStatEnsembleable<byte[]> fromConfig(long config) throws Exception;
}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigEnsembleable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigEnsembleable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigEnsembleable.java
new file mode 100644
index 0000000..ba45efd
--- /dev/null
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigEnsembleable.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+/**
+ * An incremental reconfiguration builder.
+ * This builder has access only to the incremental reconfiguration methods joining and leaving, so that we prevent
+ * mixing concepts that can't be used together.
+ */
+public interface JoinBackgroundStatConfigEnsembleable extends
+ Joinable<BackgroundStatConfigEnsembleable<byte[]>>,
+ BackgroundStatConfigEnsembleable<byte[]> {
+
+}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigurable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigurable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigurable.java
deleted file mode 100644
index fb18c0c..0000000
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/JoinBackgroundStatConfigurable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.curator.framework.api;
-
-/**
- * An incremental reconfiguration builder.
- * This builder has access only to the incremental reconfiguration methods joining and leaving, so that we prevent
- * mixing concepts that can't be used together.
- */
-public interface JoinBackgroundStatConfigurable extends
- Joinable<BackgroundStatConfigurable<byte[]>>,
- BackgroundStatConfigurable<byte[]> {
-
-}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigEnsembleable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigEnsembleable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigEnsembleable.java
new file mode 100644
index 0000000..a6316c1
--- /dev/null
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigEnsembleable.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+/**
+ * An non-incremental reconfiguration builder.
+ * This builder has access only to the non-incremental reconfiguration methods withMembers, so that we prevent
+ * mixing concepts that can't be used together.
+ */
+public interface LeaveBackgroundStatConfigEnsembleable extends
+ Leaveable<BackgroundStatConfigEnsembleable<byte[]>>,
+ BackgroundStatConfigEnsembleable<byte[]> {
+
+}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigurable.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigurable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigurable.java
deleted file mode 100644
index 196ffca..0000000
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/LeaveBackgroundStatConfigurable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.curator.framework.api;
-
-/**
- * An non-incremental reconfiguration builder.
- * This builder has access only to the non-incremental reconfiguration methods withMembers, so that we prevent
- * mixing concepts that can't be used together.
- */
-public interface LeaveBackgroundStatConfigurable extends
- Leaveable<BackgroundStatConfigurable<byte[]>>,
- BackgroundStatConfigurable<byte[]> {
-
-}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/api/ReconfigBuilder.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/ReconfigBuilder.java b/curator-framework/src/main/java/org/apache/curator/framework/api/ReconfigBuilder.java
index 96ebdf7..f05b99e 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/api/ReconfigBuilder.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/api/ReconfigBuilder.java
@@ -19,8 +19,8 @@
package org.apache.curator.framework.api;
public interface ReconfigBuilder extends
- Joinable<LeaveBackgroundStatConfigurable>,
- Leaveable<JoinBackgroundStatConfigurable>,
- Memberable<BackgroundStatConfigurable<byte[]>> {
+ Joinable<LeaveBackgroundStatConfigEnsembleable>,
+ Leaveable<JoinBackgroundStatConfigEnsembleable>,
+ Memberable<BackgroundStatConfigEnsembleable<byte[]>> {
}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/imps/GetConfigBuilderImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/GetConfigBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/GetConfigBuilderImpl.java
index 59a621a..d331a0a 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/GetConfigBuilderImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/GetConfigBuilderImpl.java
@@ -50,7 +50,7 @@ public class GetConfigBuilderImpl implements GetConfigBuilder, BackgroundOperati
@Override
public Ensembleable<byte[]> storingStatIn(Stat stat) {
- this.stat = new Stat();
+ this.stat = stat;
return this;
}
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
index 7a33297..5489691 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
@@ -21,13 +21,13 @@ package org.apache.curator.framework.imps;
import org.apache.curator.RetryLoop;
import org.apache.curator.TimeTrace;
import org.apache.curator.framework.api.BackgroundCallback;
-import org.apache.curator.framework.api.BackgroundStatConfigurable;
-import org.apache.curator.framework.api.Configurable;
+import org.apache.curator.framework.api.BackgroundStatConfigEnsembleable;
+import org.apache.curator.framework.api.BackgroundStatEnsembleable;
import org.apache.curator.framework.api.CuratorEvent;
import org.apache.curator.framework.api.CuratorEventType;
import org.apache.curator.framework.api.Ensembleable;
-import org.apache.curator.framework.api.JoinBackgroundStatConfigurable;
-import org.apache.curator.framework.api.LeaveBackgroundStatConfigurable;
+import org.apache.curator.framework.api.JoinBackgroundStatConfigEnsembleable;
+import org.apache.curator.framework.api.LeaveBackgroundStatConfigEnsembleable;
import org.apache.curator.framework.api.ReconfigBuilder;
import org.apache.zookeeper.AsyncCallback;
import org.apache.zookeeper.data.Stat;
@@ -46,7 +46,7 @@ public class ReconfigBuilderImpl implements ReconfigBuilder {
this.client = client;
}
- private static class ReconfigBuilderBase implements BackgroundStatConfigurable<byte[]>, Ensembleable<byte[]>, BackgroundOperation<EnsembleServersAndConfig> {
+ private static class ReconfigBuilderBase implements BackgroundStatConfigEnsembleable<byte[]>, Ensembleable<byte[]>, BackgroundOperation<EnsembleServersAndConfig> {
final CuratorFrameworkImpl client;
final List<String> joiningServers = new LinkedList<String>();
@@ -62,49 +62,49 @@ public class ReconfigBuilderImpl implements ReconfigBuilder {
}
@Override
- public Configurable<byte[]> inBackground() {
+ public Ensembleable<byte[]> inBackground() {
backgrounding = new Backgrounding();
return this;
}
@Override
- public Configurable<byte[]> inBackground(Object context) {
+ public Ensembleable<byte[]> inBackground(Object context) {
backgrounding = new Backgrounding(context);
return this;
}
@Override
- public Configurable<byte[]> inBackground(BackgroundCallback callback) {
+ public Ensembleable<byte[]> inBackground(BackgroundCallback callback) {
backgrounding = new Backgrounding(callback);
return this;
}
@Override
- public Configurable<byte[]> inBackground(BackgroundCallback callback, Object context) {
+ public Ensembleable<byte[]> inBackground(BackgroundCallback callback, Object context) {
backgrounding = new Backgrounding(callback, context);
return this;
}
@Override
- public Configurable<byte[]> inBackground(BackgroundCallback callback, Executor executor) {
+ public Ensembleable<byte[]> inBackground(BackgroundCallback callback, Executor executor) {
backgrounding = new Backgrounding(callback, executor);
return this;
}
@Override
- public Configurable<byte[]> inBackground(BackgroundCallback callback, Object context, Executor executor) {
+ public Ensembleable<byte[]> inBackground(BackgroundCallback callback, Object context, Executor executor) {
backgrounding = new Backgrounding(client, callback, context, executor);
return this;
}
@Override
- public Ensembleable<byte[]> fromConfig(long config) throws Exception {
+ public BackgroundStatEnsembleable<byte[]> fromConfig(long config) throws Exception {
this.config = config;
return this;
}
@Override
- public Configurable<byte[]> storingStatIn(Stat stat) {
+ public Ensembleable<byte[]> storingStatIn(Stat stat) {
this.stat = stat;
return this;
}
@@ -166,27 +166,27 @@ public class ReconfigBuilderImpl implements ReconfigBuilder {
}
}
- private static class JoinReconfigBuilder extends ReconfigBuilderBase implements JoinBackgroundStatConfigurable {
+ private static class JoinReconfigBuilderConfig extends ReconfigBuilderBase implements JoinBackgroundStatConfigEnsembleable {
- private JoinReconfigBuilder(CuratorFrameworkImpl client) {
+ private JoinReconfigBuilderConfig(CuratorFrameworkImpl client) {
super(client);
}
@Override
- public BackgroundStatConfigurable<byte[]> joining(String... servers) {
+ public BackgroundStatConfigEnsembleable<byte[]> joining(String... servers) {
joiningServers.addAll(Arrays.asList(servers));
return this;
}
}
- private static class LeaveReconfigBuilder extends ReconfigBuilderBase implements LeaveBackgroundStatConfigurable {
+ private static class LeaveReconfigBuilderConfig extends ReconfigBuilderBase implements LeaveBackgroundStatConfigEnsembleable {
- private LeaveReconfigBuilder(CuratorFrameworkImpl client) {
+ private LeaveReconfigBuilderConfig(CuratorFrameworkImpl client) {
super(client);
}
@Override
- public BackgroundStatConfigurable<byte[]> leaving(String... servers) {
+ public BackgroundStatConfigEnsembleable<byte[]> leaving(String... servers) {
leavingServers.addAll(Arrays.asList(servers));
return this;
}
@@ -194,21 +194,21 @@ public class ReconfigBuilderImpl implements ReconfigBuilder {
@Override
- public LeaveBackgroundStatConfigurable joining(String... servers) {
- LeaveReconfigBuilder builder = new LeaveReconfigBuilder(client);
+ public LeaveBackgroundStatConfigEnsembleable joining(String... servers) {
+ LeaveReconfigBuilderConfig builder = new LeaveReconfigBuilderConfig(client);
builder.joiningServers.addAll(Arrays.asList(servers));
return builder;
}
@Override
- public JoinBackgroundStatConfigurable leaving(String... servers) {
- JoinReconfigBuilder builder = new JoinReconfigBuilder(client);
+ public JoinBackgroundStatConfigEnsembleable leaving(String... servers) {
+ JoinReconfigBuilderConfig builder = new JoinReconfigBuilderConfig(client);
builder.leavingServers.addAll(Arrays.asList(servers));
return builder;
}
@Override
- public BackgroundStatConfigurable<byte[]> withMembers(String... servers) {
+ public BackgroundStatConfigEnsembleable<byte[]> withMembers(String... servers) {
ReconfigBuilderBase builder = new ReconfigBuilderBase(client);
builder.members.addAll(Arrays.asList(servers));
return builder;
http://git-wip-us.apache.org/repos/asf/curator/blob/dbdcf2f1/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReconfiguration.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReconfiguration.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReconfiguration.java
index faec551..44f9d00 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReconfiguration.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestReconfiguration.java
@@ -101,14 +101,14 @@ public class TestReconfiguration {
String server2 = getServerString(qv, cluster, 2L);
//Remove Servers
- bytes = client.reconfig().leaving("1").storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ bytes = client.reconfig().leaving("1").fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 4);
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString2to5);
- bytes = client.reconfig().leaving("2").storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ bytes = client.reconfig().leaving("2").fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 3);
@@ -116,14 +116,14 @@ public class TestReconfiguration {
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString3to5);
//Add Servers
- bytes = client.reconfig().joining("server.2=" + server2).storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ bytes = client.reconfig().joining("server.2=" + server2).fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 4);
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString2to5);
- bytes = client.reconfig().joining("server.1=" + server1).storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ bytes = client.reconfig().joining("server.1=" + server1).fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 5);
@@ -157,27 +157,27 @@ public class TestReconfiguration {
//Remove Servers
- client.reconfig().leaving("1").inBackground(callback).fromConfig(qv.getVersion()).forEnsemble();
+ client.reconfig().leaving("1").fromConfig(qv.getVersion()).inBackground(callback).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString2to5);
qv = getQuorumVerifier(bytes.get());
Assert.assertEquals(qv.getAllMembers().size(), 4);
- client.reconfig().leaving("2").inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ client.reconfig().leaving("2").fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString3to5);
qv = getQuorumVerifier(bytes.get());
Assert.assertEquals(qv.getAllMembers().size(), 3);
//Add Servers
- client.reconfig().joining("server.2=" + server2).inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ client.reconfig().joining("server.2=" + server2).fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString2to5);
qv = getQuorumVerifier(bytes.get());
Assert.assertEquals(qv.getAllMembers().size(), 4);
- client.reconfig().joining("server.1=" + server1).inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ client.reconfig().joining("server.1=" + server1).fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString1to5);
qv = getQuorumVerifier(bytes.get());
@@ -203,7 +203,7 @@ public class TestReconfiguration {
"server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 4);
@@ -214,7 +214,7 @@ public class TestReconfiguration {
.withMembers("server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 3);
@@ -228,7 +228,7 @@ public class TestReconfiguration {
"server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 4);
@@ -241,7 +241,7 @@ public class TestReconfiguration {
"server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .storingStatIn(stat).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).storingStatIn(stat).forEnsemble();
qv = getQuorumVerifier(bytes);
Assert.assertEquals(qv.getAllMembers().size(), 5);
@@ -279,7 +279,7 @@ public class TestReconfiguration {
"server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString2to5);
qv = getQuorumVerifier(bytes.get());
@@ -289,7 +289,7 @@ public class TestReconfiguration {
.withMembers("server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString3to5);
qv = getQuorumVerifier(bytes.get());
@@ -301,7 +301,7 @@ public class TestReconfiguration {
"server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString2to5);
qv = getQuorumVerifier(bytes.get());
@@ -313,7 +313,7 @@ public class TestReconfiguration {
"server.3=" + server3,
"server.4=" + server4,
"server.5=" + server5)
- .inBackground(callback, latch).fromConfig(qv.getVersion()).forEnsemble();
+ .fromConfig(qv.getVersion()).inBackground(callback, latch).forEnsemble();
waitOnDelegateListener.waitForEvent();
Assert.assertEquals(dynamicEnsembleProvider.getConnectionString(), connectionString1to5);
qv = getQuorumVerifier(bytes.get());