This repository was archived by the owner on Mar 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
samples/snippets/src/main/java/com/example/bigquery Expand file tree Collapse file tree Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments