You can tryout the ExtendedFuture class of the futures4j library which extends CompletableFuture and supports thread interruption of stages through ExtendedFuture#cancel(true). See https://github.com/futures4j/futures4j#ExtendedFuture
var myFuture = ExtendedFuture.supplyAsync(...);
myFuture.cancel(true); // Will attempt to interrupt the async task
var myFutureNonInterruptible = myFuture.asNonInterruptible();
myFutureNonInterruptible.cancel(true); // Behaves like CompletableFuture.cancel(true), which ignores the boolean value