/** Waits for the initialFuture to resolve and then starts to poll the return operation. */ OperationFutureImpl<ResponseT, MetadataT> futureCall( ApiFuture<OperationSnapshot> initialFuture, ApiCallContext callContext) { RecheckingCallable<RequestT, OperationSnapshot> callable = new RecheckingCallable<>( new OperationCheckingCallable<RequestT>(longRunningClient, initialFuture), executor); // NOTE: OperationCheckingCallable will compose its own request using the resolved // initialFuture. So the request parameter to futureCall is ignored RetryingFuture<OperationSnapshot> pollingFuture = callable.futureCall(null, callContext); return new OperationFutureImpl<>( pollingFuture, initialFuture, responseTransformer, metadataTransformer); }
/** Waits for the initialFuture to resolve and then starts to poll the return operation. */ OperationFutureImpl<ResponseT, MetadataT> futureCall( ApiFuture<OperationSnapshot> initialFuture, ApiCallContext callContext) { RecheckingCallable<RequestT, OperationSnapshot> callable = new RecheckingCallable<>( new OperationCheckingCallable<RequestT>(longRunningClient, initialFuture), executor); // NOTE: OperationCheckingCallable will compose its own request using the resolved // initialFuture. So the request parameter to futureCall is ignored RetryingFuture<OperationSnapshot> pollingFuture = callable.futureCall(null, callContext); return new OperationFutureImpl<>( pollingFuture, initialFuture, responseTransformer, metadataTransformer); }