Extension of scheduler, different logic in FetchManager regarding re-requesting (exponential backoff, and flipping broadcast/forwarding hint)
diff --git a/scheduler/scheduler.h b/scheduler/scheduler.h
index 7fe5db0..18bd9bd 100644
--- a/scheduler/scheduler.h
+++ b/scheduler/scheduler.h
@@ -71,7 +71,7 @@
// if task with the same tag exists, the task is not added and return false
virtual bool
- addTask(TaskPtr task);
+ addTask(TaskPtr task, bool reset = true);
// delete task by task->tag, regardless of whether it's invoked or not
virtual void
@@ -101,7 +101,13 @@
// rescheduleTask(A) is called at second 4, A will be reschedule to run
// at second 9
virtual void
- rescheduleTask(const TaskPtr &task);
+ rescheduleTask(TaskPtr task);
+
+ virtual void
+ rescheduleTaskAt (const Task::Tag &tag, double time);
+
+ virtual void
+ rescheduleTaskAt (TaskPtr task, double time);
void
eventLoop();
@@ -115,7 +121,7 @@
protected:
bool
- addToMap(const TaskPtr &task);
+ addToMap(TaskPtr task);
protected:
typedef std::map<Task::Tag, TaskPtr> TaskMap;