[ISSUE #493] remove AwareManager.execute for schedule executor

This commit is contained in:
yanhom 2024-10-22 23:17:37 +08:00
parent bfea3b2621
commit 0c3ed380d3

View File

@ -58,34 +58,29 @@ public class ScheduledThreadPoolExecutorProxy extends ScheduledThreadPoolExecuto
@Override
public void execute(Runnable command) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
super.execute(command);
}
@Override
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.schedule(command, delay, unit);
}
public <V> ScheduledFuture<V> schedule(Runnable command, V result, long delay, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.schedule(Executors.callable(command, result), delay, unit);
}
@Override
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.scheduleAtFixedRate(command, initialDelay, period, unit);
}
@Override
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
command = getEnhancedTask(command);
AwareManager.execute(this, command);
return super.scheduleWithFixedDelay(command, initialDelay, delay, unit);
}