class BackupManager {

    public CompletableFuture<?> submit(UUID uuid, File source)
    {
        requireNonNull(uuid, "uuid is null");
        requireNonNull(source, "source is null");

        if (backupStore.isEmpty()) {
            return completedFuture(null);
        }

        // TODO: decrement when the running task is finished (not immediately on cancel)
        pendingBackups.incrementAndGet();
        CompletableFuture<?> future = runAsync(new BackgroundBackup(uuid, source), executorService);
        future.whenComplete((none, throwable) -> pendingBackups.decrementAndGet());
        return future;
    }

    @Inject public  BackupManager(Optional<BackupStore> backupStore, StorageService storageService, BackupConfig config);
    public  BackupManager(Optional<BackupStore> backupStore, StorageService storageService, int backupThreads);

}