mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
clean code
This commit is contained in:
@@ -323,7 +323,7 @@ public abstract class Binding {
|
||||
public static class MethodInfoBindingParser implements BindingParser {
|
||||
@Override
|
||||
public Binding parse(Annotation annotation) {
|
||||
return new MethodDeclarationBinding();
|
||||
return new MethodInfoBinding();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.taobao.arthas.core.advisor;
|
||||
|
||||
/**
|
||||
* 通知监听适配器
|
||||
*/
|
||||
public class AdviceListenerAdapter implements AdviceListener {
|
||||
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before(
|
||||
ClassLoader loader, String className, String methodName, String methodDesc,
|
||||
Object target, Object[] args) throws Throwable {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterReturning(
|
||||
ClassLoader loader, String className, String methodName, String methodDesc,
|
||||
Object target, Object[] args,
|
||||
Object returnObject) throws Throwable {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterThrowing(
|
||||
ClassLoader loader, String className, String methodName, String methodDesc,
|
||||
Object target, Object[] args,
|
||||
Throwable throwable) throws Throwable {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-8
@@ -4,7 +4,6 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -23,15 +22,9 @@ import com.taobao.arthas.core.shell.system.Job;
|
||||
* @author gehui 2017年7月31日 上午11:55:41
|
||||
*/
|
||||
public class GlobalJobControllerImpl extends JobControllerImpl {
|
||||
|
||||
private Timer timer;
|
||||
private Map<Integer, TimerTask> jobTimeoutTaskMap = new HashMap<Integer, TimerTask>();
|
||||
private static final Logger logger = LoggerFactory.getLogger(GlobalJobControllerImpl.class);
|
||||
|
||||
public GlobalJobControllerImpl() {
|
||||
timer = ArthasBootstrap.getInstance().getTimer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close(final Handler<Void> completionHandler) {
|
||||
if (completionHandler != null) {
|
||||
@@ -70,7 +63,7 @@ public class GlobalJobControllerImpl extends JobControllerImpl {
|
||||
}
|
||||
};
|
||||
Date timeoutDate = new Date(System.currentTimeMillis() + (getJobTimeoutInSecond() * 1000));
|
||||
timer.schedule(jobTimeoutTask, timeoutDate);
|
||||
ArthasBootstrap.getInstance().getTimer().schedule(jobTimeoutTask, timeoutDate);
|
||||
jobTimeoutTaskMap.put(job.id(), jobTimeoutTask);
|
||||
job.setTimeoutDate(timeoutDate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user