You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2019/09/02 17:04:33 UTC
[curator] branch CURATOR-537 created (now d05e7dc)
This is an automated email from the ASF dual-hosted git repository.
randgalt pushed a change to branch CURATOR-537
in repository https://gitbox.apache.org/repos/asf/curator.git.
at d05e7dc CURATOR-537 - make getOurPath() public
This branch includes the following new commits:
new d05e7dc CURATOR-537 - make getOurPath() public
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[curator] 01/01: CURATOR-537 - make getOurPath() public
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randgalt pushed a commit to branch CURATOR-537
in repository https://gitbox.apache.org/repos/asf/curator.git
commit d05e7dc4bb3eec010d2dd56cfe4ea57bfdf688d9
Author: randgalt <ra...@apache.org>
AuthorDate: Mon Sep 2 12:04:22 2019 -0500
CURATOR-537 - make getOurPath() public
---
.../apache/curator/framework/recipes/leader/LeaderLatch.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
index a0b2187..79b2601 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java
@@ -480,8 +480,16 @@ public class LeaderLatch implements Closeable
return (state.get() == State.STARTED) && hasLeadership.get();
}
- @VisibleForTesting
- String getOurPath()
+ /**
+ * Return this instance's lock node path. IMPORTANT: this instance
+ * owns the path returned. This method is meant for reference only. Also,
+ * it is possible for <code>null</code> to be returned. The path, if any,
+ * returned is not guaranteed to be valid at any point in the future as internal
+ * state changes might require the instance to delete and create a new path.
+ *
+ * @return lock node path or <code>null</code>
+ */
+ public String getOurPath()
{
return ourPath.get();
}