curator git commit: for some reason, one of the constructors got messed up
Repository: curator Updated Branches: refs/heads/CURATOR-268 add56dc92 -> 537156db4 for some reason, one of the constructors got messed up Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/537156db Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/537156db Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/537156db Branch: refs/heads/CURATOR-268 Commit: 537156db46becd67542a653d6ab055168ed507d0 Parents: add56dc Author: randgalt Authored: Mon Oct 5 20:27:46 2015 -0500 Committer: randgalt Committed: Mon Oct 5 20:27:46 2015 -0500 -- .../src/main/java/org/apache/curator/CuratorZookeeperClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/537156db/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java -- diff --git a/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java b/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java index 471adf0..18d8572 100644 --- a/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java +++ b/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java @@ -93,7 +93,7 @@ public class CuratorZookeeperClient implements Closeable */ public CuratorZookeeperClient(ZookeeperFactory zookeeperFactory, EnsembleProvider ensembleProvider, int sessionTimeoutMs, int connectionTimeoutMs, Watcher watcher, RetryPolicy retryPolicy, boolean canBeReadOnly) { -this(new DefaultZookeeperFactory(), ensembleProvider, sessionTimeoutMs, connectionTimeoutMs, watcher, retryPolicy, canBeReadOnly, new ClassicConnectionHandlingPolicy()); +this(zookeeperFactory, ensembleProvider, sessionTimeoutMs, connectionTimeoutMs, watcher, retryPolicy, canBeReadOnly, new ClassicConnectionHandlingPolicy()); } /**
[2/2] curator git commit: for some reason, one of the constructors got messed up
for some reason, one of the constructors got messed up Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/537156db Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/537156db Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/537156db Branch: refs/heads/CURATOR-3.0 Commit: 537156db46becd67542a653d6ab055168ed507d0 Parents: add56dc Author: randgalt Authored: Mon Oct 5 20:27:46 2015 -0500 Committer: randgalt Committed: Mon Oct 5 20:27:46 2015 -0500 -- .../src/main/java/org/apache/curator/CuratorZookeeperClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/537156db/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java -- diff --git a/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java b/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java index 471adf0..18d8572 100644 --- a/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java +++ b/curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java @@ -93,7 +93,7 @@ public class CuratorZookeeperClient implements Closeable */ public CuratorZookeeperClient(ZookeeperFactory zookeeperFactory, EnsembleProvider ensembleProvider, int sessionTimeoutMs, int connectionTimeoutMs, Watcher watcher, RetryPolicy retryPolicy, boolean canBeReadOnly) { -this(new DefaultZookeeperFactory(), ensembleProvider, sessionTimeoutMs, connectionTimeoutMs, watcher, retryPolicy, canBeReadOnly, new ClassicConnectionHandlingPolicy()); +this(zookeeperFactory, ensembleProvider, sessionTimeoutMs, connectionTimeoutMs, watcher, retryPolicy, canBeReadOnly, new ClassicConnectionHandlingPolicy()); } /**
[1/2] curator git commit: Support delete().quietly() and create().orSetData()
Repository: curator Updated Branches: refs/heads/CURATOR-3.0 afa8f7a45 -> 537156db4 Support delete().quietly() and create().orSetData() Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/add56dc9 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/add56dc9 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/add56dc9 Branch: refs/heads/CURATOR-3.0 Commit: add56dc92e4564ce5d146a8f3c0a8ae51c6dc46f Parents: afa8f7a Author: randgalt Authored: Fri Oct 2 17:22:48 2015 -0500 Committer: randgalt Committed: Fri Oct 2 17:22:48 2015 -0500 -- .../curator/framework/api/CreateBuilder.java| 65 +-- .../framework/api/CreateBuilderMain.java| 86 .../curator/framework/api/DeleteBuilder.java| 4 +- .../framework/api/DeleteBuilderMain.java| 23 ++ .../framework/imps/CreateBuilderImpl.java | 61 ++ .../framework/imps/DeleteBuilderImpl.java | 21 + .../curator/framework/imps/TestFramework.java | 75 + 7 files changed, 271 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/add56dc9/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java index fa1a68e..564d11b 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java @@ -18,69 +18,8 @@ */ package org.apache.curator.framework.api; -import org.apache.zookeeper.CreateMode; - public interface CreateBuilder extends -BackgroundPathAndBytesable, -CreateModable>, -ACLCreateModeBackgroundPathAndBytesable, -Compressible, -Statable> +CreateBuilderMain { -/** - * Causes any parent nodes to get created if they haven't already been - * - * @return this - */ -public ProtectACLCreateModeStatPathAndBytesable creatingParentsIfNeeded(); - -/** - * Causes any parent nodes to get created using {@link CreateMode#CONTAINER} if they haven't already been. - * IMPORTANT NOTE: container creation is a new feature in recent versions of ZooKeeper. - * If the ZooKeeper version you're using does not support containers, the parent nodes - * are created as ordinary PERSISTENT nodes. - * - * @return this - */ -public ProtectACLCreateModeStatPathAndBytesable creatingParentContainersIfNeeded(); - -/** - * @deprecated this has been generalized to support all create modes. Instead, use: - * - * client.create().withProtection().withMode(CreateMode.PERSISTENT_SEQUENTIAL)... - * - * @return this - */ -@Deprecated -public ACLPathAndBytesable withProtectedEphemeralSequential(); - -/** - * - * Hat-tip to https://github.com/sbridges for pointing this out - * - * - * - * It turns out there is an edge case that exists when creating sequential-ephemeral - * nodes. The creation can succeed on the server, but the server can crash before - * the created node name is returned to the client. However, the ZK session is still - * valid so the ephemeral node is not deleted. Thus, there is no way for the client to - * determine what node was created for them. - * - * - * - * Even without sequential-ephemeral, however, the create can succeed on the sever - * but the client (for various reasons) will not know it. - * - * - * - * Putting the create builder into protection mode works around this. - * The name of the node that is created is prefixed with a GUID. If node creation fails - * the normal retry mechanism will occur. On the retry, the parent path is first searched - * for a node that has the GUID in it. If that node is found, it is assumed to be the lost - * node that was successfully created on the first try and is returned to the caller. - * - * - * @return this - */ -public ACLCreateModeStatBackgroundPathAndBytesable withProtection(); +CreateBuilderMain orSetData(); } http://git-wip-us.apache.org/repos/asf/curator/blob/add56dc9/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilderMain.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilderMain.java b/curator-framework/src/m