Skip to content

Commit cb2ffe9

Browse files
committed
fix: adapt to introduction of java.time in gax
1 parent ade7702 commit cb2ffe9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/CompositeTracer.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
import com.google.common.collect.ImmutableList;
2424
import java.util.ArrayList;
2525
import java.util.List;
26-
import org.threeten.bp.Duration;
26+
27+
import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration;
2728

2829
@InternalApi
2930
public class CompositeTracer extends BaseApiTracer {
@@ -108,9 +109,14 @@ public void attemptCancelled() {
108109
}
109110

110111
@Override
111-
public void attemptFailed(Throwable error, Duration delay) {
112+
public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) {
113+
attemptFailedDuration(error, toJavaTimeDuration(delay));
114+
}
115+
116+
@Override
117+
public void attemptFailedDuration(Throwable error, java.time.Duration delay) {
112118
for (ApiTracer child : children) {
113-
child.attemptFailed(error, delay);
119+
child.attemptFailedDuration(error, delay);
114120
}
115121
}
116122

0 commit comments

Comments
 (0)