Interface SchedulerContext

All Known Implementing Classes:
SimpleSchedulerContext, TransactionalSchedulerContext

public interface SchedulerContext
This is the Proxyable for scheduling tasks within the cluster.
  • Method Details

    • start

      default void start()
      Starts this SchedulerContext.
    • stop

      default void stop()
      Stops this SchedulerContext.
    • resumeTaskAfterDelay

      void resumeTaskAfterDelay(TaskId taskId, long time, TimeUnit timeUnit)
      Resumes the task associated with the supplied TaskId. This allows for the specification of a delay after a specified period of time.
      Parameters:
      taskId - the TaskId of the task
      time - the time delay
      timeUnit - the TimeUnit instance designating the time units of measure
    • resume

      void resume(TaskId taskId, Object... results)
      Resumes the supplied task with the TaskId supplying multiple results to the destination.
      Parameters:
      taskId - the TaskId of the supplied task
      results - zero or more results from resuming the task
    • resumeFromNetwork

      void resumeFromNetwork(TaskId taskId, Object result)
      Resumes a task that was waiting on a network call.
      Parameters:
      taskId - the unique TaskId associated with the network
      result - the result of the network operation, passed to the task
    • resumeWithError

      void resumeWithError(TaskId taskId, Throwable throwable)
      Resumes a task that was waiting for any reason. This is used to hand an error to the running task in order to a task waiting on an operation.
      Parameters:
      taskId - the unique TaskId associated with the network
      throwable - the error in the blocked operation