public void run()

in import/src/main/java/com/google/cloud/healthcare/imaging/dicomadapter/cstore/backup/BackupUploadService.java [140:174]


    public void run() {
      try {
        InputStream inputStream = readBackupExceptionally();
        cStoreSender.cstore(target, sopInstanceUid, sopClassUid, inputStream);
        logSuccessUpload();
      } catch (IOException io) {
        logUploadFailed(io);

        if (backupState.getAttemptsCountdown() > 0) {
          try {
            scheduleUploadWithDelay(
                backupState,
                new DicomDestinationUploadAsyncJob(
                    cStoreSender,
                    backupState,
                    target,
                    sopInstanceUid,
                    sopClassUid),
                delayCalculator.getExponentialDelayMillis(
                    backupState.getAttemptsCountdown(),
                    attemptsAmount))
                .get();
          } catch (BackupException | ExecutionException | InterruptedException ex) {
            throw new CompletionException(ex);
          }
        } else {
          MonitoringService.addEvent(Event.CSTORE_ERROR);
          throwOnNoResendAttemptsLeft(null, uniqueFileName);
        }
      } catch (InterruptedException ie) {
        log.error("cStoreSender.cstore interrupted. Runnable task canceled.", ie);
        Thread.currentThread().interrupt();
        throw new CompletionException(ie);
      }
    }