Package org.apache.ignite.scheduler
Interface SchedulerFuture<R>
- 
- All Superinterfaces:
- IgniteFuture<R>
 
 public interface SchedulerFuture<R> extends IgniteFuture<R> Future for cron-based scheduled execution. This future is returned when callingIgniteScheduler.scheduleLocal(Callable, String)orIgniteScheduler.scheduleLocal(Runnable, String)methods.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description doubleaverageExecutionTime()Gets average execution time in milliseconds since future was created.doubleaverageIdleTime()Gets average idle time for this scheduled task.intcount()Gets total count of executions this task has already completed.longcreateTime()Gets time in milliseconds at which this future was created.Rget()Waits for the completion of the next scheduled execution and returns its result.Rget(long timeout, TimeUnit unit)Waits for the completion of the next scheduled execution for specified amount of time and returns its result.Stringid()Gets scheduled task ID.booleanisRunning()Returnstrueif scheduled task is currently running.Rlast()Gets result of the last execution of scheduled task, ornullif task has not been executed, or has not produced a result yet.longlastFinishTime()Gets finish time of last execution (0if first execution has not finished).longlastIdleTime()Gets last interval between scheduled executions.longlastStartTime()Gets start time of last execution (0if never started).longnextExecutionTime()Gets next execution time of scheduled task.long[]nextExecutionTimes(int cnt, long start)Gets an array of the next execution times after passedstarttimestamp.Stringpattern()Gets scheduling pattern.- 
Methods inherited from interface org.apache.ignite.lang.IgniteFuturecancel, chain, chainAsync, get, isCancelled, isDone, listen, listenAsync
 
- 
 
- 
- 
- 
Method Detail- 
idString id() Gets scheduled task ID.- Returns:
- ID of scheduled task.
 
 - 
patternString pattern() Gets scheduling pattern.- Returns:
- Scheduling pattern.
 
 - 
createTimelong createTime() Gets time in milliseconds at which this future was created.- Returns:
- Time in milliseconds at which this future was created.
 
 - 
lastStartTimelong lastStartTime() Gets start time of last execution (0if never started).- Returns:
- Start time of last execution.
 
 - 
lastFinishTimelong lastFinishTime() Gets finish time of last execution (0if first execution has not finished).- Returns:
- Finish time of last execution (0if first execution has not finished).
 
 - 
averageExecutionTimedouble averageExecutionTime() Gets average execution time in milliseconds since future was created.- Returns:
- Average execution time in milliseconds since future was created.
 
 - 
lastIdleTimelong lastIdleTime() Gets last interval between scheduled executions. If first execution has not yet happened, then returns time passed since creation of this future.- Returns:
- Last interval between scheduled executions.
 
 - 
averageIdleTimedouble averageIdleTime() Gets average idle time for this scheduled task.- Returns:
- Average idle time for this scheduled task.
 
 - 
nextExecutionTimeslong[] nextExecutionTimes(int cnt, long start) throws IgniteExceptionGets an array of the next execution times after passedstarttimestamp.- Parameters:
- cnt- Array length.
- start- Start timestamp.
- Returns:
- Array of the next execution times in milliseconds or an empty array if there is no next execution time scheduled.
- Throws:
- IgniteException- Thrown in case of any errors.
 
 - 
countint count() Gets total count of executions this task has already completed.- Returns:
- Total count of executions this task has already completed.
 
 - 
isRunningboolean isRunning() Returnstrueif scheduled task is currently running.- Returns:
- Trueif scheduled task is currently running.
 
 - 
nextExecutionTimelong nextExecutionTime() throws IgniteExceptionGets next execution time of scheduled task.- Returns:
- Next execution time in milliseconds or 0if there is no next execution time.
- Throws:
- IgniteException- Thrown in case of any errors.
 
 - 
lastR last() throws IgniteException Gets result of the last execution of scheduled task, ornullif task has not been executed, or has not produced a result yet.- Returns:
- Result of the last execution, or nullif there isn't one yet.
- Throws:
- IgniteException- If last execution resulted in exception.
 
 - 
getR get() Waits for the completion of the next scheduled execution and returns its result.- Specified by:
- getin interface- IgniteFuture<R>
- Returns:
- Result of the next execution.
- Throws:
- CancellationException
- IgniteInterruptedException- Subclass of- IgniteExceptionthrown if the wait was interrupted.
- IgniteException- If computation failed.
 
 - 
getR get(long timeout, TimeUnit unit) Waits for the completion of the next scheduled execution for specified amount of time and returns its result.- Specified by:
- getin interface- IgniteFuture<R>
- Parameters:
- timeout- The maximum time to wait.
- unit- The time unit of the- timeoutargument.
- Returns:
- The computed result of the next execution.
- Throws:
- CancellationException
- IgniteInterruptedException- Subclass of- IgniteExceptionthrown if the wait was interrupted.
- IgniteFutureTimeoutException- Subclass of- IgniteExceptionthrown if the wait was timed out.
- IgniteException- If computation failed.
 
 
- 
 
-