if (!externalFuture.getAttemptSettings().getRpcTimeout().isZero()) { currentCallContext = currentCallContext.withTimeout(externalFuture.getAttemptSettings().getRpcTimeout());
context = context.withTimeout(totalTimeout);
context = context.withTimeout(totalTimeout);
if (!externalFuture.getAttemptSettings().getRpcTimeout().isZero()) { currentCallContext = currentCallContext.withTimeout(externalFuture.getAttemptSettings().getRpcTimeout());
@Override public ResponseT call() { ApiCallContext callContext = originalCallContext; try { Duration rpcTimeout = externalFuture.getAttemptSettings().getRpcTimeout(); if (!rpcTimeout.isZero()) { callContext = callContext.withTimeout(rpcTimeout); } externalFuture.setAttemptFuture(new NonCancellableFuture<ResponseT>()); if (externalFuture.isDone()) { return null; } callContext .getTracer() .attemptStarted(externalFuture.getAttemptSettings().getOverallAttemptCount()); ApiFuture<ResponseT> internalFuture = callable.futureCall(request, callContext); externalFuture.setAttemptFuture(internalFuture); } catch (Throwable e) { externalFuture.setAttemptFuture(ApiFutures.<ResponseT>immediateFailedFuture(e)); } return null; } }
Duration rpcTimeout = externalFuture.getAttemptSettings().getRpcTimeout(); if (!rpcTimeout.isZero()) { callContext = callContext.withTimeout(rpcTimeout);
@Override public ResponseT call() { ApiCallContext callContext = originalCallContext; try { Duration rpcTimeout = externalFuture.getAttemptSettings().getRpcTimeout(); if (!rpcTimeout.isZero()) { callContext = callContext.withTimeout(rpcTimeout); } externalFuture.setAttemptFuture(new NonCancellableFuture<ResponseT>()); if (externalFuture.isDone()) { return null; } callContext .getTracer() .attemptStarted(externalFuture.getAttemptSettings().getOverallAttemptCount()); ApiFuture<ResponseT> internalFuture = callable.futureCall(request, callContext); externalFuture.setAttemptFuture(internalFuture); } catch (Throwable e) { externalFuture.setAttemptFuture(ApiFutures.<ResponseT>immediateFailedFuture(e)); } return null; } }
Duration rpcTimeout = externalFuture.getAttemptSettings().getRpcTimeout(); if (!rpcTimeout.isZero()) { callContext = callContext.withTimeout(rpcTimeout);