Skip to content

Commit

Permalink
make naming consistent with gax
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Nov 12, 2024
1 parent 6dba8b3 commit ec0c170
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void call(
BigtableTracerResponseObserver<ResponseT> innerObserver =
new BigtableTracerResponseObserver<>(responseObserver, tracer, responseMetadata);
if (context.getRetrySettings() != null) {
tracer.setOperationTimeout(context.getRetrySettings().getTotalTimeoutDuration());
tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration());
}
innerCallable.call(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext context)
new BigtableTracerUnaryCallback<ResponseT>(
(BigtableTracer) context.getTracer(), responseMetadata);
if (context.getRetrySettings() != null) {
tracer.setOperationTimeout(context.getRetrySettings().getTotalTimeoutDuration());
tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration());
}
ApiFuture<ResponseT> future =
innerCallable.futureCall(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit ec0c170

Please sign in to comment.