use of org.datatransferproject.datatransfer.backblaze.common.BackblazeDataTransferClientFactory in project data-transfer-project by google.
the class BackblazeTransferExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
Monitor monitor = context.getMonitor();
monitor.debug(() -> "Starting Backblaze initialization");
if (initialized) {
monitor.severe(() -> "BackblazeTransferExtension already initialized.");
return;
}
TemporaryPerJobDataStore jobStore = context.getService(TemporaryPerJobDataStore.class);
ImmutableMap.Builder<String, Importer> importerBuilder = ImmutableMap.builder();
BackblazeDataTransferClientFactory backblazeDataTransferClientFactory = new BackblazeDataTransferClientFactory(monitor);
ImageStreamProvider isProvider = new ImageStreamProvider();
importerBuilder.put("PHOTOS", new BackblazePhotosImporter(monitor, jobStore, isProvider, backblazeDataTransferClientFactory));
importerBuilder.put("VIDEOS", new BackblazeVideosImporter(monitor, jobStore, isProvider, backblazeDataTransferClientFactory));
importerMap = importerBuilder.build();
initialized = true;
}
Aggregations