go back to using CompletableFuture (sigh)
This commit is contained in:
parent
c903cbf193
commit
f2b2fc769f
2 changed files with 5 additions and 4 deletions
|
@ -77,10 +77,10 @@ public interface ClientHook {
|
|||
}
|
||||
|
||||
final class VoidPromiseAndPipeline {
|
||||
public final CompletionStage<java.lang.Void> promise;
|
||||
public final CompletableFuture<java.lang.Void> promise;
|
||||
public final PipelineHook pipeline;
|
||||
|
||||
VoidPromiseAndPipeline(CompletionStage<java.lang.Void> promise, PipelineHook pipeline) {
|
||||
VoidPromiseAndPipeline(CompletableFuture<java.lang.Void> promise, PipelineHook pipeline) {
|
||||
this.promise = promise;
|
||||
this.pipeline = pipeline;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
package org.capnproto;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
|
||||
public class RemotePromise<Results>
|
||||
extends CompletableFutureWrapper<Results> {
|
||||
|
||||
final CompletionStage<Response<Results>> response;
|
||||
final CompletableFuture<Response<Results>> response;
|
||||
final PipelineHook hook;
|
||||
|
||||
RemotePromise(CompletionStage<Response<Results>> promise,
|
||||
RemotePromise(CompletableFuture<Response<Results>> promise,
|
||||
PipelineHook hook) {
|
||||
super(promise.thenApply(response -> response.getResults()));
|
||||
this.response = promise;
|
||||
|
|
Loading…
Reference in a new issue