class BackupService {

  public HashSet<PersistentID> doBackup() throws IOException {
    BackupTask task = currentTask.get();
    if (task == null) {
      throw new IOException("No backup currently in progress");
    }
    task.notifyOtherMembersReady();

    HashSet<PersistentID> result;
    try {
      result = taskFuture.get();
    } catch (InterruptedException | ExecutionException e) {
      logger.warn("Backup failed with exception: ", e);
      result = new HashSet<>();
    } finally {
      cleanup();
    }
    return result;
  }

  public  BackupService(InternalCache cache);

}