Return-Path: X-Original-To: apmail-curator-commits-archive@minotaur.apache.org Delivered-To: apmail-curator-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 091A718CC1 for ; Tue, 18 Aug 2015 23:18:19 +0000 (UTC) Received: (qmail 22663 invoked by uid 500); 18 Aug 2015 23:18:19 -0000 Delivered-To: apmail-curator-commits-archive@curator.apache.org Received: (qmail 22621 invoked by uid 500); 18 Aug 2015 23:18:18 -0000 Mailing-List: contact commits-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list commits@curator.apache.org Received: (qmail 22049 invoked by uid 99); 18 Aug 2015 23:18:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2015 23:18:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5FF06E058E; Tue, 18 Aug 2015 23:18:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dragonsinth@apache.org To: commits@curator.apache.org Date: Tue, 18 Aug 2015 23:18:38 -0000 Message-Id: <8ced997053fc4adda823ef3eb92d5012@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [22/31] curator git commit: CURATOR-161 - Updates after review. CURATOR-161 - Updates after review. Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/4f21e318 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/4f21e318 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/4f21e318 Branch: refs/heads/CURATOR-3.0 Commit: 4f21e318f796cec4b32cafe14e0e2bf240817114 Parents: a47c036 Author: Cameron McKenzie Authored: Wed May 20 11:57:10 2015 +1000 Committer: Cameron McKenzie Committed: Wed May 20 11:57:10 2015 +1000 ---------------------------------------------------------------------- .../api/BackgroundPathableQuietly.java | 5 --- .../api/BackgroundPathableQuietlyable.java | 5 +++ .../curator/framework/api/DeleteBuilder.java | 2 +- .../curator/framework/api/Guaranteeable.java | 2 +- .../framework/api/GuaranteeableDeletable.java | 39 ++++++++++++++++++++ .../framework/api/GuaranteeableDelete.java | 39 -------------------- .../framework/api/RemoveWatchesLocal.java | 4 +- .../framework/api/RemoveWatchesType.java | 2 +- .../imps/FailedRemoveWatchManager.java | 2 +- .../framework/imps/NamespaceWatcherMap.java | 8 ---- .../imps/RemoveWatchesBuilderImpl.java | 4 +- 11 files changed, 52 insertions(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietly.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietly.java b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietly.java deleted file mode 100644 index 1174067..0000000 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietly.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.apache.curator.framework.api; - -public interface BackgroundPathableQuietly extends BackgroundPathable, Quietly> -{ -} http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietlyable.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietlyable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietlyable.java new file mode 100644 index 0000000..8ed73fa --- /dev/null +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/BackgroundPathableQuietlyable.java @@ -0,0 +1,5 @@ +package org.apache.curator.framework.api; + +public interface BackgroundPathableQuietlyable extends BackgroundPathable, Quietly> +{ +} http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/DeleteBuilder.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/DeleteBuilder.java b/curator-framework/src/main/java/org/apache/curator/framework/api/DeleteBuilder.java index 893e825..2da1843 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/DeleteBuilder.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/DeleteBuilder.java @@ -18,6 +18,6 @@ */ package org.apache.curator.framework.api; -public interface DeleteBuilder extends GuaranteeableDelete, ChildrenDeletable +public interface DeleteBuilder extends GuaranteeableDeletable, ChildrenDeletable { } http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/Guaranteeable.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/Guaranteeable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/Guaranteeable.java index b43d6b0..bc033ac 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/Guaranteeable.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/Guaranteeable.java @@ -24,7 +24,7 @@ public interface Guaranteeable * Solves edge cases where an operation may succeed on the server but connection failure occurs before a * response can be successfully returned to the client. * - * @see org.apache.curator.framework.api.GuaranteeableDelete + * @see org.apache.curator.framework.api.GuaranteeableDeletable * * @return this */ http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDeletable.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDeletable.java b/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDeletable.java new file mode 100644 index 0000000..7f8139c --- /dev/null +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDeletable.java @@ -0,0 +1,39 @@ +/** + * 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; + +/** + *

+ * Solves this edge case: deleting a node can fail due to connection issues. Further, + * if the node was ephemeral, the node will not get auto-deleted as the session is still valid. + * This can wreak havoc with lock implementations. + *

+ * + *

+ * When guaranteed is set, Curator will record failed node deletions and + * attempt to delete them in the background until successful. NOTE: you will still get an + * exception when the deletion fails. But, you can be assured that as long as the + * {@link org.apache.curator.framework.CuratorFramework} instance is open attempts will be made to delete the node. + *

+ * + * @return this + */ +public interface GuaranteeableDeletable extends Guaranteeable, BackgroundVersionable +{ +} http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDelete.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDelete.java b/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDelete.java deleted file mode 100644 index d04e7ea..0000000 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/GuaranteeableDelete.java +++ /dev/null @@ -1,39 +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; - -/** - *

- * Solves this edge case: deleting a node can fail due to connection issues. Further, - * if the node was ephemeral, the node will not get auto-deleted as the session is still valid. - * This can wreak havoc with lock implementations. - *

- * - *

- * When guaranteed is set, Curator will record failed node deletions and - * attempt to delete them in the background until successful. NOTE: you will still get an - * exception when the deletion fails. But, you can be assured that as long as the - * {@link org.apache.curator.framework.CuratorFramework} instance is open attempts will be made to delete the node. - *

- * - * @return this - */ -public interface GuaranteeableDelete extends Guaranteeable, BackgroundVersionable -{ -} http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesLocal.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesLocal.java b/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesLocal.java index e002857..1c94fb3 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesLocal.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesLocal.java @@ -4,7 +4,7 @@ package org.apache.curator.framework.api; * Builder to allow the specification of whether it is acceptable to remove client side watch information * in the case where ZK cannot be contacted. */ -public interface RemoveWatchesLocal extends BackgroundPathableQuietly +public interface RemoveWatchesLocal extends BackgroundPathableQuietlyable { /** @@ -12,6 +12,6 @@ public interface RemoveWatchesLocal extends BackgroundPathableQuietly * is not available. Note that the standard Curator retry loop will not be used in t * @return */ - public BackgroundPathableQuietly locally(); + public BackgroundPathableQuietlyable locally(); } http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesType.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesType.java b/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesType.java index 3112eac..21b5b50 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesType.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/RemoveWatchesType.java @@ -6,7 +6,7 @@ import org.apache.zookeeper.Watcher.WatcherType; * Builder to allow the specification of whether it is acceptable to remove client side watch information * in the case where ZK cannot be contacted. */ -public interface RemoveWatchesType extends RemoveWatchesLocal, Guaranteeable> +public interface RemoveWatchesType extends RemoveWatchesLocal, Guaranteeable> { /** http://git-wip-us.apache.org/repos/asf/curator/blob/4f21e318/curator-framework/src/main/java/org/apache/curator/framework/imps/FailedRemoveWatchManager.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/FailedRemoveWatchManager.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/FailedRemoveWatchManager.java index f954e2a..f635660 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/FailedRemoveWatchManager.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/FailedRemoveWatchManager.java @@ -32,7 +32,7 @@ class FailedRemoveWatchManager extends FailedOperationManager locally() + public BackgroundPathableQuietlyable locally() { local = true; return this;