mirror of
https://github.com/dromara/dynamic-tp.git
synced 2024-10-23 08:34:05 +08:00
Merge pull request #494 from dromara/fix-493
[ISSUE #493] remove AwareManager.execute for schedule executor
This commit is contained in:
commit
961ba60456
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user