Interface SchedulerFuture<R>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double averageExecutionTime()
      Gets average execution time in milliseconds since future was created.
      double averageIdleTime()
      Gets average idle time for this scheduled task.
      int count()
      Gets total count of executions this task has already completed.
      long createTime()
      Gets time in milliseconds at which this future was created.
      R get()
      Waits for the completion of the next scheduled execution and returns its result.
      R get​(long timeout, TimeUnit unit)
      Waits for the completion of the next scheduled execution for specified amount of time and returns its result.
      String id()
      Gets scheduled task ID.
      boolean isRunning()
      Returns true if scheduled task is currently running.
      R last()
      Gets result of the last execution of scheduled task, or null if task has not been executed, or has not produced a result yet.
      long lastFinishTime()
      Gets finish time of last execution (0 if first execution has not finished).
      long lastIdleTime()
      Gets last interval between scheduled executions.
      long lastStartTime()
      Gets start time of last execution (0 if never started).
      long nextExecutionTime()
      Gets next execution time of scheduled task.
      long[] nextExecutionTimes​(int cnt, long start)
      Gets an array of the next execution times after passed start timestamp.
      String pattern()
      Gets scheduling pattern.
    • Method Detail

      • id

        String id()
        Gets scheduled task ID.
        Returns:
        ID of scheduled task.
      • pattern

        String pattern()
        Gets scheduling pattern.
        Returns:
        Scheduling pattern.
      • createTime

        long createTime()
        Gets time in milliseconds at which this future was created.
        Returns:
        Time in milliseconds at which this future was created.
      • lastStartTime

        long lastStartTime()
        Gets start time of last execution (0 if never started).
        Returns:
        Start time of last execution.
      • lastFinishTime

        long lastFinishTime()
        Gets finish time of last execution (0 if first execution has not finished).
        Returns:
        Finish time of last execution (0 if first execution has not finished).
      • averageExecutionTime

        double averageExecutionTime()
        Gets average execution time in milliseconds since future was created.
        Returns:
        Average execution time in milliseconds since future was created.
      • lastIdleTime

        long 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.
      • averageIdleTime

        double averageIdleTime()
        Gets average idle time for this scheduled task.
        Returns:
        Average idle time for this scheduled task.
      • nextExecutionTimes

        long[] nextExecutionTimes​(int cnt,
                                  long start)
                           throws IgniteException
        Gets an array of the next execution times after passed start timestamp.
        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.
      • count

        int count()
        Gets total count of executions this task has already completed.
        Returns:
        Total count of executions this task has already completed.
      • isRunning

        boolean isRunning()
        Returns true if scheduled task is currently running.
        Returns:
        True if scheduled task is currently running.
      • nextExecutionTime

        long nextExecutionTime()
                        throws IgniteException
        Gets next execution time of scheduled task.
        Returns:
        Next execution time in milliseconds or 0 if there is no next execution time.
        Throws:
        IgniteException - Thrown in case of any errors.
      • last

        R last()
        throws IgniteException
        Gets result of the last execution of scheduled task, or null if task has not been executed, or has not produced a result yet.
        Returns:
        Result of the last execution, or null if there isn't one yet.
        Throws:
        IgniteException - If last execution resulted in exception.