Convert most revision modify views to retrying helper

Change-Id: I4e24beb1ef38831633a3e8945ba8cbff55c8226c
This commit is contained in:
Dave Borowitz
2017-05-02 12:40:02 -04:00
parent ae52afc058
commit 3c23f1dd79
10 changed files with 78 additions and 51 deletions

View File

@@ -224,6 +224,8 @@ class RevisionApiImpl implements RevisionApi {
@Override
public void submit(SubmitInput in) throws RestApiException {
try {
// TODO(dborowitz): Convert to RetryingRestModifyHandler. Requires converting MergeOp to a
// Factory that takes BatchUpdate.Factory. (Enough Factories yet?)
submit.apply(revision, in);
} catch (Exception e) {
throw asRestApiException("Cannot submit change", e);
@@ -238,6 +240,8 @@ class RevisionApiImpl implements RevisionApi {
@Override
public BinaryResult submitPreview(String format) throws RestApiException {
try {
// TODO(dborowitz): Convert to RetryingRestModifyHandler. Requires converting MergeOp to a
// Factory that takes BatchUpdate.Factory.
submitPreview.setFormat(format);
return submitPreview.apply(revision);
} catch (Exception e) {