Esempio n. 1
0
 /**
  * This method retrieves a previously scheduled task scheduling pattern.
  *
  * @param id The task ID.
  * @return The requested scheduling pattern, or null if the task was not found.
  * @since 2.0
  */
 public SchedulingPattern getSchedulingPattern(String id) {
   return memoryTaskCollector.getSchedulingPattern(id);
 }
Esempio n. 2
0
 /**
  * This method retrieves a previously scheduled task.
  *
  * @param id The task ID.
  * @return The requested task, or null if the task was not found.
  * @since 2.0
  */
 public Task getTask(String id) {
   return memoryTaskCollector.getTask(id);
 }
Esempio n. 3
0
 /**
  * This method changes the scheduling pattern of a task.
  *
  * @param id The ID assigned to the previously scheduled task.
  * @param schedulingPattern The new scheduling pattern for the task.
  * @since 2.0
  */
 public void reschedule(String id, SchedulingPattern schedulingPattern) {
   memoryTaskCollector.update(id, schedulingPattern);
 }
Esempio n. 4
0
 /**
  * This methods cancels the scheduling of a task.
  *
  * @param id The ID of the task.
  */
 public void deschedule(String id) {
   memoryTaskCollector.remove(id);
 }
Esempio n. 5
0
 /**
  * This method schedules a task execution.
  *
  * @param schedulingPattern The scheduling pattern for the task.
  * @param task The task, as a plain Runnable object.
  * @return The task auto-generated ID assigned by the scheduler. This ID can be used later to
  *     reschedule and deschedule the task, and also to retrieve informations about it.
  * @since 2.0
  */
 public String schedule(SchedulingPattern schedulingPattern, Task task) {
   return memoryTaskCollector.add(schedulingPattern, task);
 }