summaryrefslogtreecommitdiffstats
path: root/zkfacade
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2022-04-07 07:44:53 +0200
committerGitHub <noreply@github.com>2022-04-07 07:44:53 +0200
commitd64b19dfd37d63a49df0daaab6a4d3dc541ac422 (patch)
tree61a3bb98083a8d28830948da4af14a439f48286e /zkfacade
parentbc65f3e83649ca7d24b20b772beb2c6e0f648e6b (diff)
Revert "Start using new Curator locks in controller"
Diffstat (limited to 'zkfacade')
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java3
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/MultiplePathsLock.java41
2 files changed, 0 insertions, 44 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java
index 3f9c52594a3..56ae65bb317 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java
@@ -69,9 +69,6 @@ public class Lock implements Mutex {
throw new RuntimeException("Exception releasing lock '" + lockPath + "'");
}
}
-
- protected String lockPath() { return lockPath; }
-
}
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/MultiplePathsLock.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/MultiplePathsLock.java
deleted file mode 100644
index 65ae77c8ffa..00000000000
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/MultiplePathsLock.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.curator;
-
-import com.yahoo.concurrent.UncheckedTimeoutException;
-import com.yahoo.path.Path;
-
-import java.time.Duration;
-
-/**
- * Class that holds two locks, originally used for transitioning from one lock to
- * another, where you need to hold both the old lock and the new lock in the
- * transition period.
- *
- * @author hmusum
- */
-public class MultiplePathsLock extends Lock {
-
- private final Lock oldLock;
- private final Lock newLock;
-
- public MultiplePathsLock(Path newLockPath, Path oldLockPath, Duration timeout, Curator curator) {
- super(newLockPath.getAbsolute(), curator);
- this.newLock = curator.lock(newLockPath, timeout);
- this.oldLock = curator.lock(oldLockPath, timeout);;
- }
-
- @Override
- public void acquire(Duration timeout) throws UncheckedTimeoutException {
- oldLock.acquire(timeout);
- newLock.acquire(timeout);
- }
-
- @Override
- public void close() {
- oldLock.close();
- newLock.close();
- }
-
-}
-
-