class FileBucketTarCreatorBootstrapRecovery {

    public void initializeOnBootstrap(String fileBucketId, FileBucketTarCreator fileBucketTarCreator,
        BucketTopologyHelper bucketTopologyHelper) {

        Set<String> containerNames = bucketTopologyHelper.listContainerNames(fileBucketId);

        try {

            // List existing files
            for (String containerName : containerNames) {
                try (Stream<String> storageIdsStream = this.basicFileStorage
                    .listStorageIdsByContainerName(containerName)) {
                    Iterator<List<String>> bulkIterator = Iterators.partition(
                        storageIdsStream.iterator(), VitamConfiguration.getBatchSize());

                    while (bulkIterator.hasNext()) {

                        List<String> storageIds = bulkIterator.next();
                        try {
                            recoverBulkStorageIds(containerName, storageIds, fileBucketTarCreator);
                        } catch (ObjectReferentialException e) {
                            throw new VitamRuntimeException("Could not initialize service to container " + containerName
                                + " files " + storageIds, e);
                        }
                    }
                }
            }
        } catch (IOException e) {
            throw new VitamRuntimeException(
                "Could not recover file bucket tar creator on bootstrap for fileBucket " + fileBucketId, e);
        }
    }

    public  FileBucketTarCreatorBootstrapRecovery(
        BasicFileStorage basicFileStorage,
        ObjectReferentialRepository objectReferentialRepository);

}