TasksStorage: Remove synchronized from methods
These aren't expected to be necessary for correctness.
Change-Id: Id23d3b385e289ba453638b76d6523016a5aabf2a
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
index 0d5604c..c847f55 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
@@ -137,11 +137,11 @@
return isMultiPrimary;
}
- public synchronized String create(ReplicateRefUpdate r) {
+ public String create(ReplicateRefUpdate r) {
return new Task(r).create();
}
- public synchronized Set<String> start(UriUpdates uriUpdates) {
+ public Set<String> start(UriUpdates uriUpdates) {
Set<String> startedRefs = new HashSet<>();
for (ReplicateRefUpdate update : uriUpdates.getReplicateRefUpdates()) {
Task t = new Task(update);
@@ -152,13 +152,13 @@
return startedRefs;
}
- public synchronized void reset(UriUpdates uriUpdates) {
+ public void reset(UriUpdates uriUpdates) {
for (ReplicateRefUpdate update : uriUpdates.getReplicateRefUpdates()) {
new Task(update).reset();
}
}
- public synchronized void recoverAll() {
+ public void recoverAll() {
streamRunning().forEach(r -> new Task(r).recover());
}