private CompletableFuture<Void> applyChanges(LoaderStatus loaderStatus, JpsOutputLoader<?> loader) {
    if (loaderStatus == LoaderStatus.FAILED) {
      myNettyClient.sendDescriptionStatusMessage(JpsBuildBundle.message("progress.text.rolling.back"));
      return CompletableFuture.runAsync(() -> loader.rollback(), INSTANCE);
    }
    return CompletableFuture.runAsync(() -> loader.apply(), INSTANCE);
  }
private CompletableFuture<Void> applyChanges(LoaderStatus loaderStatus, JpsOutputLoader<?> loader)