diff options
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/timer')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduledTask.java | 11 | ||||
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduler.java | 32 |
2 files changed, 0 insertions, 43 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduledTask.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduledTask.java deleted file mode 100644 index d9bd2d2..0000000 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduledTask.java +++ /dev/null @@ -1,11 +0,0 @@ -package pl.edu.mimuw.cloudatlas.agent.timer; - -import java.util.TimerTask; - -public class TimerScheduledTask extends TimerTask { - - @Override - public void run() { - - } -} diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduler.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduler.java deleted file mode 100644 index 6408a52..0000000 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/timer/TimerScheduler.java +++ /dev/null @@ -1,32 +0,0 @@ -package pl.edu.mimuw.cloudatlas.agent.timer; - -import java.util.Timer; -import java.util.TimerTask; - -/** - * Initializes a timer within a constructor during its attachment to the executor - * Runs in a thread separate from executor - maybe refactor so that it's attached to executor's thread - * - * Handle used to attach tasks to schedule - * Tasks declared as inherited from TimerTask - * - * TODO: add request id and custom time - */ -public class TimerScheduler { - private Timer timer; - - TimerScheduler() { - this.timer = new Timer(); - System.out.println("TimerScheduler instance initialized"); - } - - public void handle(TimerTask task, long delay, long period) { - this.timer.scheduleAtFixedRate(task, delay, period); - System.out.println("Task with delay " + delay + " and period " + period + " scheduled"); - } - - public void handle(TimerTask task, long delay) { - this.timer.schedule(task, delay); - System.out.println("Task with delay " + delay + " scheduled"); - } -} |