From f72e275163e693662d2c10600b8d1b577b5998d2 Mon Sep 17 00:00:00 2001 From: hecy7 Date: Mon, 11 Dec 2023 11:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=99=A8=E5=8F=AF=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=B1=BB=E5=9E=8B=E6=8E=A8=E5=AF=BC=E6=97=A0=E9=9C=80?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A3=B0=E6=98=8E=E3=80=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?@Override=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hecy7 --- .../arthas/core/shell/impl/ShellServerImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java b/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java index 38934d79a2..10d373a30e 100644 --- a/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java +++ b/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java @@ -61,11 +61,11 @@ public class ShellServerImpl extends ShellServer { public ShellServerImpl(ShellServerOptions options) { this.welcomeMessage = options.getWelcomeMessage(); - this.termServers = new ArrayList(); + this.termServers = new ArrayList<>(); this.timeoutMillis = options.getSessionTimeout(); - this.sessions = new ConcurrentHashMap(); + this.sessions = new ConcurrentHashMap<>(); this.reaperInterval = options.getReaperInterval(); - this.resolvers = new CopyOnWriteArrayList(); + this.resolvers = new CopyOnWriteArrayList<>(); this.commandManager = new InternalCommandManager(resolvers); this.instrumentation = options.getInstrumentation(); this.pid = options.getPid(); @@ -141,7 +141,7 @@ public ShellServer listen(final Handler> listenHandler) { private void evictSessions() { long now = System.currentTimeMillis(); - Set toClose = new HashSet(); + Set toClose = new HashSet<>(); for (ShellImpl session : sessions.values()) { // do not close if there is still job running, // e.g. trace command might wait for a long time before condition is met @@ -229,7 +229,7 @@ public void close(final Handler> completionHandler) { scheduledExecutorService.shutdownNow(); } toStop = termServers; - toClose = new ArrayList(sessions.values()); + toClose = new ArrayList<>(sessions.values()); if (toClose.isEmpty()) { sessionsClosed.complete(); } @@ -253,10 +253,12 @@ public void close(final Handler> completionHandler) { } } + @Override public JobControllerImpl getJobController() { return jobController; } + @Override public InternalCommandManager getCommandManager() { return commandManager; }