Package com.microstrategy.webapi.utils
Interface IScheduler<T>
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
Scheduler
public interface IScheduler<T> extends java.lang.AutoCloseable
IScheduler always runs on a whole minute (zero seconds). It starts on the very next minute when you construct the object You specify the number of minutes to use as a period
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IScheduler.Factory
static interface
IScheduler.ITask<T>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
close shuts down the scheduling.java.util.ArrayList<java.util.Calendar>
getNextRuns(int iNumberOfRuns)
getNextRuns gets the time of the next iNumberOfRuns.void
triggerTask(T iT)
triggerTask runs a task right now (even when it is not time for the schedule).
-
-
-
Method Detail
-
getNextRuns
java.util.ArrayList<java.util.Calendar> getNextRuns(int iNumberOfRuns)
getNextRuns gets the time of the next iNumberOfRuns. The times do not accout for any triggerTask() calls; it ONLY returns regularly scheduled times
-
triggerTask
void triggerTask(T iT)
triggerTask runs a task right now (even when it is not time for the schedule). The schedule times are not affected by this task
-
close
void close()
close shuts down the scheduling. Any tasks currently running will continue until completion. No new tasks will be run. It waits until all currently running tasks are complete, so when this method returns you know the thread is gone- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-