C0urante commented on code in PR #15598:
URL: https://github.com/apache/kafka/pull/15598#discussion_r1653326568
##########
clients/src/main/java/org/apache/kafka/common/utils/Exit.java:
##########
@@ -119,4 +119,51 @@ public static void resetHaltProcedure() {
public static void resetShutdownHookAdder() {
shutdownHookAdder = DEFAULT_SHUTDOWN_HOOK_ADDER;
}
+
+ public void exitOrThrow(int statusCode) {
+ exit(statusCode, null);
+ }
+
+ public abstract void exitOrThrow(int statusCode, String message);
+
+ public void haltOrThrow(int statusCode) {
+ halt(statusCode, null);
+ }
+
+ public abstract void haltOrThrow(int statusCode, String message);
+
+ public abstract void addShutdownRunnable(String name, Runnable runnable);
Review Comment:
Could we have brief Javadocs on these? Beyond the obvious, it'd be nice to
note when callers could expect the `OrThrow` behavior to take place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]