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 <[email protected]> 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(); }
