Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit c465953

Browse files
committed
consolidate todo comments into one place
1 parent 321026f commit c465953

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,15 @@ public static void main(String... args) {
2828
// TODO(developer): Replace projectId and retryAlgorithm classes before
2929
// running the sample. The ResultRetryAlgorithm abortOn and retryOn methods
3030
// can be used to specify retry behavior when the client encounters
31-
// exceptions during its execution.
31+
// exceptions during its execution. Alternatively, you can create your own
32+
// custom class that implements the ResultRetryAlgorithm interface.
3233
String projectId = "project-id";
3334
ResultRetryAlgorithm<?> retryAlgorithm =
3435
ExceptionHandler.newBuilder()
3536
.abortOn(RuntimeException.class)
3637
.retryOn(java.net.ConnectException.class)
3738
.retryOn(java.net.UnknownHostException.class)
3839
.retryOn(java.net.SocketException.class)
39-
// Alternatively, you can create your own Interceptor object that
40-
// implements the com.google.cloud.ExceptionHandler.Interceptor
41-
// interface. See
42-
// https://github.com/googleapis/sdk-platform-java/blob/f18318660c05d0d8466e3ead7127f0747fac2e2e/java-core/google-cloud-core/src/main/java/com/google/cloud/ExceptionHandler.java#L49
4340
.addInterceptors(BaseService.EXCEPTION_HANDLER_INTERCEPTOR)
4441
.build();
4542
setCustomRetryAlgorithm(projectId, retryAlgorithm);

0 commit comments

Comments
 (0)