diff options
Diffstat (limited to 'zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java')
-rw-r--r-- | zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java index bc47a02ea19..af5716f2e52 100644 --- a/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java +++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java @@ -225,9 +225,10 @@ public class Curator implements AutoCloseable { /** * Creates an empty node at a path, creating any parents as necessary. * If the node already exists nothing is done. + * Returns whether a change was attempted. */ - public void create(Path path) { - if (exists(path)) return; + public boolean create(Path path) { + if (exists(path)) return false; String absolutePath = path.getAbsolute(); try { @@ -237,6 +238,7 @@ public class Curator implements AutoCloseable { } catch (Exception e) { throw new RuntimeException("Could not create " + absolutePath, e); } + return true; } /** |