diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2019-02-21 12:46:27 +0100 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2019-02-22 14:23:36 +0100 |
commit | d01ed036f6a654ee8bd371cdbf269f760b7c17e0 (patch) | |
tree | 57b32a73fdcab04f6a580e953245c0463d345395 /node-repository | |
parent | 8bd7b6534fab28d507629fca1c109fff65585c40 (diff) |
Delete unused class
Diffstat (limited to 'node-repository')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/EagerCountingCuratorTransaction.java | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/EagerCountingCuratorTransaction.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/EagerCountingCuratorTransaction.java deleted file mode 100644 index cd50e98616c..00000000000 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/EagerCountingCuratorTransaction.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.provision.persistence; - -import com.yahoo.transaction.AbstractTransaction; -import com.yahoo.transaction.Transaction; -import com.yahoo.vespa.curator.recipes.CuratorCounter; - -/** - * A curator transaction of curator counting operations which increments during prepare - * such that the counter is also increased if there is a commit error. - */ -class EagerCountingCuratorTransaction extends AbstractTransaction { - - /** Creates a counting curator transaction containing a single increment operation */ - public EagerCountingCuratorTransaction(CuratorCounter counter) { - add(new CountingCuratorOperation(counter)); - } - - @Override - public void prepare() { - for (Operation operation : operations()) - ((CountingCuratorOperation)operation).next(); - } - - @Override - public void commit() { } - - @Override - public void rollbackOrLog() { } - - static class CountingCuratorOperation implements Transaction.Operation { - - private final CuratorCounter counter; - - public CountingCuratorOperation(CuratorCounter counter) { - this.counter = counter; - } - - public void next() { - counter.next(); - } - - } - -} |