コード例 #1
0
ファイル: AbstractRestore.java プロジェクト: c3-e/opscenter
  protected void download(Iterator<AbstractBackupPath> fsIterator, BackupFileType filter, int lastN)
      throws Exception {
    if (fsIterator == null) return;

    BoundedList bl = new BoundedList(lastN);
    while (fsIterator.hasNext()) {
      AbstractBackupPath temp = fsIterator.next();
      if (temp.type == BackupFileType.SST && tracker.contains(temp)) continue;

      if (temp.getType() == filter) {
        bl.add(temp);
      }
    }

    download(bl.iterator(), filter);
  }
コード例 #2
0
ファイル: AbstractRestore.java プロジェクト: c3-e/opscenter
  protected void download(Iterator<AbstractBackupPath> fsIterator, BackupFileType filter)
      throws Exception {
    while (fsIterator.hasNext()) {
      AbstractBackupPath temp = fsIterator.next();
      if (temp.type == BackupFileType.SST && tracker.contains(temp)) continue;

      if (temp.getType() == filter) {
        File localFileHandler = temp.newRestoreFile();
        logger.debug(
            "Created local file name: %s",
            localFileHandler.getAbsolutePath() + File.pathSeparator + localFileHandler.getName());
        download(temp, localFileHandler);
      }
    }
    waitToComplete();
  }