CompletableFuture<Void> (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); }