diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java index 4320bfac9..05e8b0d05 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java @@ -106,7 +106,7 @@ public void grpcMessageSent() { * Record the operation timeout from user settings for calculating remaining deadline. This will * be called in BuiltinMetricsTracer. */ - public void setOperationTimeout(Duration operationTimeout) { + public void setTotalTimeoutDuration(Duration totalTimeoutDuration) { // noop } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java index af981cd86..13b832b8b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java @@ -63,7 +63,7 @@ public void call( BigtableTracerResponseObserver innerObserver = new BigtableTracerResponseObserver<>(responseObserver, tracer, responseMetadata); if (context.getRetrySettings() != null) { - tracer.setOperationTimeout(context.getRetrySettings().getTotalTimeoutDuration()); + tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration()); } innerCallable.call( request, diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java index 6f7d64883..37ba74bfd 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java @@ -60,7 +60,7 @@ public ApiFuture futureCall(RequestT request, ApiCallContext context) new BigtableTracerUnaryCallback( (BigtableTracer) context.getTracer(), responseMetadata); if (context.getRetrySettings() != null) { - tracer.setOperationTimeout(context.getRetrySettings().getTotalTimeoutDuration()); + tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration()); } ApiFuture future = innerCallable.futureCall( diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java index 9c9c47cfb..1d6bcb5f5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java @@ -303,10 +303,11 @@ public void grpcMessageSent() { This is called by BigtableTracerCallables that sets operation timeout from user settings. */ @Override - public void setOperationTimeout(java.time.Duration operationTimeout) { + public void setTotalTimeoutDuration(java.time.Duration totalTimeoutDuration) { if (operationDeadline == null) { - this.operationDeadline = Deadline.after(operationTimeout.toMillis(), TimeUnit.MILLISECONDS); - this.remainingDeadline = operationTimeout.toMillis(); + this.operationDeadline = + Deadline.after(totalTimeoutDuration.toMillis(), TimeUnit.MILLISECONDS); + this.remainingDeadline = totalTimeoutDuration.toMillis(); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java index 3d6956107..7882c82d9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java @@ -241,9 +241,9 @@ public void grpcMessageSent() { } @Override - public void setOperationTimeout(java.time.Duration operationTimeout) { + public void setTotalTimeoutDuration(java.time.Duration totalTimeoutDuration) { for (BigtableTracer tracer : bigtableTracers) { - tracer.setOperationTimeout(operationTimeout); + tracer.setTotalTimeoutDuration(totalTimeoutDuration); } } }