链式
public static void main(String[] args) throws Exception {
CompletableFuture<Integer> thenCompose = T1()
.thenCompose(Compress::T2)
.thenCompose(Compress::T3);
Integer result = thenCompose.get();
System.out.println(result);
}
// 假设这些是异步操作,并返回CompletableFuture<Integer>
public static CompletableFuture<Integer> T1() {
return CompletableFuture.supplyAsync