summaryrefslogtreecommitdiffstats
path: root/zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java
diff options
context:
space:
mode:
Diffstat (limited to 'zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java')
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java
index dd49b2595a4..2167b45bc02 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java
@@ -1,6 +1,7 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.curator.recipes;
+import com.yahoo.path.Path;
import com.yahoo.vespa.curator.Curator;
import org.apache.curator.framework.recipes.atomic.AtomicValue;
import org.apache.curator.framework.recipes.atomic.DistributedAtomicLong;
@@ -9,15 +10,14 @@ import org.apache.curator.framework.recipes.atomic.DistributedAtomicLong;
* A distributed atomic counter.
*
* @author Ulf Lilleengen
- * @since 5.1
*/
public class CuratorCounter {
private final DistributedAtomicLong counter;
- private final String counterPath;
+ private final Path counterPath;
- public CuratorCounter(Curator curator, String counterPath) {
- this.counter = curator.createAtomicCounter(counterPath);
+ public CuratorCounter(Curator curator, Path counterPath) {
+ this.counter = curator.createAtomicCounter(counterPath.getAbsolute());
this.counterPath = counterPath;
}