use of build.bazel.remote.execution.v2.WaitExecutionRequest in project bazel-buildfarm by bazelbuild.
the class StubInstance method watchOperation.
@Override
public ListenableFuture<Void> watchOperation(String operationName, Watcher watcher) {
WaitExecutionRequest request = WaitExecutionRequest.newBuilder().setName(operationName).build();
SettableFuture<Void> result = SettableFuture.create();
newExStub().waitExecution(request, new StreamObserver<Operation>() {
@Override
public void onNext(Operation operation) {
watcher.observe(operation);
}
@Override
public void onError(Throwable t) {
result.setException(t);
}
@Override
public void onCompleted() {
result.set(null);
}
});
return result;
}
Aggregations