You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "caigy (via GitHub)" <gi...@apache.org> on 2023/02/21 02:37:06 UTC
[GitHub] [rocketmq] caigy commented on a diff in pull request #6130: [ISSUE #6129]refactor: Polish some code in `ShutdownHookThread`
caigy commented on code in PR #6130:
URL: https://github.com/apache/rocketmq/pull/6130#discussion_r1112476532
##########
srvutil/src/main/java/org/apache/rocketmq/srvutil/ShutdownHookThread.java:
##########
@@ -23,22 +23,22 @@
import java.util.concurrent.atomic.AtomicInteger;
/**
- * {@link ShutdownHookThread} is the standard hook for filtersrv and namesrv modules.
+ * {@link ShutdownHookThread} is the standard hook for controller and namesrv modules.
* Through {@link Callable} interface, this hook can customization operations in anywhere.
*/
public class ShutdownHookThread extends Thread {
private volatile boolean hasShutdown = false;
- private AtomicInteger shutdownTimes = new AtomicInteger(0);
+ private final AtomicInteger shutdownTimes = new AtomicInteger(0);
private final Logger log;
- private final Callable callback;
+ private final Callable<Void> callback;
Review Comment:
Is it `Callable` still necessary?
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org