Skip to content

Instantly share code, notes, and snippets.

@sherman
Created May 3, 2015 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sherman/92ffed906a94c6e204dd to your computer and use it in GitHub Desktop.
Save sherman/92ffed906a94c6e204dd to your computer and use it in GitHub Desktop.
CompletableFuture.<Void>runAsync(replicationTask, replicationTaskExecutor)
.thenAcceptAsync(aVoid -> {
log.info("Repair of disk {} finished on node {}", diskId, membershipService.getSelfNode());
semaphore.release();
})
.exceptionally(throwable -> {
log.error("Can't repair cluster", throwable);
semaphore.release();
return null;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment