diff options
author | Nasser Grainawi <nasser@codeaurora.org> | 2020-11-02 17:02:18 -0700 |
---|---|---|
committer | Nasser Grainawi <nasser@codeaurora.org> | 2020-11-02 17:27:40 -0700 |
commit | f25727a949121dd6709264c22c7e12fa8fb30f75 (patch) | |
tree | d4a3480e4df7d1ed3709ed5ec9c0ff984847faac | |
parent | bbb3bb300a7c9ab43ef7196fe366882a14f83487 (diff) |
ReplicationQueue: Remove unused isPersisted param
Since Ie83763e4a9fe13522f356b569fc2360fa5883224, all callers set this
to false.
Change-Id: I38a8a31853f5d2bc3b292b49bd050bc34f6408fe
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java index b93a83d..6af4156 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java @@ -117,17 +117,17 @@ public class ReplicationQueue public void scheduleFullSync( Project.NameKey project, String urlMatch, ReplicationState state, boolean now) { - fire(project, urlMatch, PushOne.ALL_REFS, state, now, false); + fire(project, urlMatch, PushOne.ALL_REFS, state, now); } @Override public void onGitReferenceUpdated(GitReferenceUpdatedListener.Event event) { - fire(event.getProjectName(), event.getRefName(), false); + fire(event.getProjectName(), event.getRefName()); } - private void fire(String projectName, String refName, boolean isPersisted) { + private void fire(String projectName, String refName) { ReplicationState state = new ReplicationState(new GitUpdateProcessing(dispatcher.get())); - fire(Project.nameKey(projectName), null, refName, state, false, isPersisted); + fire(Project.nameKey(projectName), null, refName, state, false); state.markAllPushTasksScheduled(); } @@ -136,8 +136,7 @@ public class ReplicationQueue String urlMatch, String refName, ReplicationState state, - boolean now, - boolean isPersisted) { + boolean now) { if (!running) { stateLog.warn( "Replication plugin did not finish startup before event, event replication is postponed", @@ -147,7 +146,7 @@ public class ReplicationQueue } for (Destination cfg : destinations.get().getAll(FilterType.ALL)) { - pushReference(cfg, project, urlMatch, refName, state, now, isPersisted); + pushReference(cfg, project, urlMatch, refName, state, now); } } @@ -161,7 +160,7 @@ public class ReplicationQueue @UsedAt(UsedAt.Project.COLLABNET) public void pushReference(Destination cfg, Project.NameKey project, String refName) { - pushReference(cfg, project, null, refName, null, true, false); + pushReference(cfg, project, null, refName, null, true); } private void pushReference( @@ -170,18 +169,15 @@ public class ReplicationQueue String urlMatch, String refName, ReplicationState state, - boolean now, - boolean isPersisted) { + boolean now) { boolean withoutState = state == null; if (withoutState) { state = new ReplicationState(new GitUpdateProcessing(dispatcher.get())); } if (cfg.wouldPushProject(project) && cfg.wouldPushRef(refName)) { for (URIish uri : cfg.getURIs(project, urlMatch)) { - if (!isPersisted) { - replicationTasksStorage.create( - new ReplicateRefUpdate(project.get(), refName, uri, cfg.getRemoteConfigName())); - } + replicationTasksStorage.create( + new ReplicateRefUpdate(project.get(), refName, uri, cfg.getRemoteConfigName())); cfg.schedule(project, refName, uri, state, now); } } else { @@ -258,7 +254,7 @@ public class ReplicationQueue String eventKey = String.format("%s:%s", event.projectName(), event.refName()); if (!eventsReplayed.contains(eventKey)) { repLog.atInfo().log("Firing pending task %s", event); - fire(event.projectName(), event.refName(), false); + fire(event.projectName(), event.refName()); eventsReplayed.add(eventKey); } } |