@Test public void initializeEmptyFileBucketDirectories() throws Exception { Files.createDirectories(inputTarStorageFolder.resolve(FILE_BUCKET_1)); Files.createDirectories(inputTarStorageFolder.resolve(FILE_BUCKET_2)); writeOrderCreatorBootstrapRecovery.initializeOnBootstrap(); verify(bucketTopologyHelper).listFileBuckets(); verifyNoMoreInteractions(bucketTopologyHelper, archiveReferentialRepository, writeOrderCreator, tarFileRapairer); }
public void initializeOnBootstrap() { try { Path fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(BucketTopologyHelper.BACKUP_FILE_BUCKET); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(BucketTopologyHelper.BACKUP_FILE_BUCKET, fileBucketTarStoragePath); } for (String fileBucket : bucketTopologyHelper.listFileBuckets()) { fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(fileBucket); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(fileBucket, fileBucketTarStoragePath); } } } catch (Exception e) { throw new VitamRuntimeException("Could not reschedule tar files to copy on tape", e); } }
WriteOrderCreatorBootstrapRecovery { public void initializeOnBootstrap() { try { Path fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(BucketTopologyHelper.BACKUP_FILE_BUCKET); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(BucketTopologyHelper.BACKUP_FILE_BUCKET, fileBucketTarStoragePath); } for (String fileBucket : bucketTopologyHelper.listFileBuckets()) { fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(fileBucket); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(fileBucket, fileBucketTarStoragePath); } } } catch (Exception e) { throw new VitamRuntimeException("Could not reschedule tar files to copy on tape", e); } } }
WriteOrderCreatorBootstrapRecovery { public void initializeOnBootstrap() { try { Path fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(BucketTopologyHelper.BACKUP_FILE_BUCKET); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(BucketTopologyHelper.BACKUP_FILE_BUCKET, fileBucketTarStoragePath); } for (String fileBucket : bucketTopologyHelper.listFileBuckets()) { fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(fileBucket); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(fileBucket, fileBucketTarStoragePath); } } } catch (Exception e) { throw new VitamRuntimeException("Could not reschedule tar files to copy on tape", e); } } WriteOrderCreatorBootstrapRecovery(
        String inputTarStorageFolder,
        ArchiveReferentialRepository archiveReferentialRepository,
        BucketTopologyHelper bucketTopologyHelper,
        WriteOrderCreator writeOrderCreator, TarFileRapairer tarFileRapairer); }
WriteOrderCreatorBootstrapRecovery { public void initializeOnBootstrap() { try { Path fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(BucketTopologyHelper.BACKUP_FILE_BUCKET); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(BucketTopologyHelper.BACKUP_FILE_BUCKET, fileBucketTarStoragePath); } for (String fileBucket : bucketTopologyHelper.listFileBuckets()) { fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(fileBucket); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(fileBucket, fileBucketTarStoragePath); } } } catch (Exception e) { throw new VitamRuntimeException("Could not reschedule tar files to copy on tape", e); } } WriteOrderCreatorBootstrapRecovery(
        String inputTarStorageFolder,
        ArchiveReferentialRepository archiveReferentialRepository,
        BucketTopologyHelper bucketTopologyHelper,
        WriteOrderCreator writeOrderCreator, TarFileRapairer tarFileRapairer); void initializeOnBootstrap(); }
WriteOrderCreatorBootstrapRecovery { public void initializeOnBootstrap() { try { Path fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(BucketTopologyHelper.BACKUP_FILE_BUCKET); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(BucketTopologyHelper.BACKUP_FILE_BUCKET, fileBucketTarStoragePath); } for (String fileBucket : bucketTopologyHelper.listFileBuckets()) { fileBucketTarStoragePath = Paths.get(inputTarStorageFolder).resolve(fileBucket); if (fileBucketTarStoragePath.toFile().exists()) { recoverFileBucket(fileBucket, fileBucketTarStoragePath); } } } catch (Exception e) { throw new VitamRuntimeException("Could not reschedule tar files to copy on tape", e); } } WriteOrderCreatorBootstrapRecovery(
        String inputTarStorageFolder,
        ArchiveReferentialRepository archiveReferentialRepository,
        BucketTopologyHelper bucketTopologyHelper,
        WriteOrderCreator writeOrderCreator, TarFileRapairer tarFileRapairer); void initializeOnBootstrap();  }