Package com.google.cloud
Class ExceptionHandler.Builder
java.lang.Object
com.google.cloud.ExceptionHandler.Builder
- Enclosing class:
- ExceptionHandler
ExceptionHandler builder.
-
Method Summary
Modifier and TypeMethodDescriptionfinal ExceptionHandler.BuilderAdds the exceptions to abort on.addInterceptors(ExceptionHandler.Interceptor... interceptors) Adds the exception handler interceptors.build()Returns a new ExceptionHandler instance.final ExceptionHandler.BuilderAdd the exceptions to ignore/retry-on.
-
Method Details
-
addInterceptors
Adds the exception handler interceptors. Call order will be maintained.- Parameters:
interceptors- the interceptors for this exception handler- Returns:
- the Builder for chaining
-
retryOn
@SafeVarargs public final ExceptionHandler.Builder retryOn(Class<? extends Exception>... exceptions) Add the exceptions to ignore/retry-on.- Parameters:
exceptions- retry should continue when such exceptions are thrown- Returns:
- the Builder for chaining
-
abortOn
@SafeVarargs public final ExceptionHandler.Builder abortOn(Class<? extends Exception>... exceptions) Adds the exceptions to abort on.- Parameters:
exceptions- retry should abort when such exceptions are thrown- Returns:
- the Builder for chaining
-
build
Returns a new ExceptionHandler instance.
-