Merge branch 'stable-3.4'
* stable-3.4:
Set version to v3.4.0-rc1
Change-Id: I3d1e05bcfb0215715d7a224ffcd9de058b91c4b2
diff --git a/pom.xml b/pom.xml
index 222e077..46370bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
<groupId>com.gerritforge</groupId>
<artifactId>global-refdb</artifactId>
- <version>3.3.3</version>
+ <version>3.4.0-rc1</version>
<packaging>jar</packaging>
<name>global-refdb</name>
@@ -38,7 +38,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <gerrit.version>3.3.2</gerrit.version>
+ <gerrit.version>3.4.0-rc1</gerrit.version>
</properties>
<dependencies>
@@ -49,6 +49,12 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>com.ryanharter.auto.value</groupId>
+ <artifactId>auto-value-gson</artifactId>
+ <version>1.3.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-acceptance-framework</artifactId>
<version>${gerrit.version}</version>
diff --git a/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/BatchRefUpdateValidator.java b/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/BatchRefUpdateValidator.java
index e91d083..0fe5ad5 100644
--- a/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/BatchRefUpdateValidator.java
+++ b/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/BatchRefUpdateValidator.java
@@ -102,6 +102,8 @@
*
* @param batchRefUpdate batchRefUpdate object
* @param batchRefUpdateFunction batchRefUpdate function to execute upon validation
+ * @param batchRefUpdateRollbackFunction function to invoke when the ref-update needs to be rolled
+ * back
* @throws IOException batch update failed
*/
@SuppressWarnings("JavadocReference")
diff --git a/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/RefUpdateValidator.java b/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/RefUpdateValidator.java
index 6ab430d..7fa5645 100644
--- a/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/RefUpdateValidator.java
+++ b/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/RefUpdateValidator.java
@@ -122,11 +122,9 @@
/**
* Checks whether the provided refUpdate should be validated first against the shared ref-db. If
* not it just execute the provided refUpdateFunction. If it should be validated against the
- * global refdb then it does so by executing the {@link
- * RefUpdateValidator#doExecuteRefUpdate(RefUpdate, NoParameterFunction,
- * OneParameterFunction<ObjectId, Result>)} first. Upon success the refUpdate is returned, upon
- * failure split brain metrics are incremented and a {@link SharedDbSplitBrainException} is
- * thrown.
+ * global refdb then it does so by executing the {@link RefUpdateValidator#doExecuteRefUpdate}
+ * first. Upon success the refUpdate is returned, upon failure split brain metrics are incremented
+ * and a {@link SharedDbSplitBrainException} is thrown.
*
* <p>Validation is performed when either of these condition is true
*
@@ -140,6 +138,7 @@
*
* @param refUpdate the refUpdate command
* @param refUpdateFunction the refUpdate function to execute after validation
+ * @param rollbackFunction function to invoke when the ref-update needs to be rolled back
* @return the result of the update, or "null" in case a split brain was detected but the policy
* enforcement was not REQUIRED
* @throws IOException Execution of ref update failed
diff --git a/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/SharedRefDbBatchRefUpdate.java b/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/SharedRefDbBatchRefUpdate.java
index 5007dc6..bc3158b 100644
--- a/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/SharedRefDbBatchRefUpdate.java
+++ b/src/main/java/com/gerritforge/gerrit/globalrefdb/validation/SharedRefDbBatchRefUpdate.java
@@ -199,8 +199,7 @@
* one of the underlying update command or by the batch ref validator proving that the current
* ref-db is not up-to-date with the global refdb
* @see BatchRefUpdate
- * @see BatchRefUpdateValidator#executeBatchUpdateWithValidation(BatchRefUpdate,
- * RefUpdateValidator.NoParameterVoidFunction)
+ * @see BatchRefUpdateValidator#executeBatchUpdateWithValidation
*/
@Override
public void execute(RevWalk walk, ProgressMonitor monitor, List<String> options)
@@ -225,8 +224,7 @@
* one of the underlying update command or by the batch ref validator proving that the current
* ref-db is not up-to-date with the global refdb
* @see BatchRefUpdate
- * @see BatchRefUpdateValidator#executeBatchUpdateWithValidation(BatchRefUpdate,
- * RefUpdateValidator.NoParameterVoidFunction)
+ * @see BatchRefUpdateValidator#executeBatchUpdateWithValidation
*/
@Override
public void execute(RevWalk walk, ProgressMonitor monitor) throws IOException {