Interface IDerivedDataExecutorPool

All Known Implementing Classes:
DerivedDataExecutorPool, TestPool

public interface IDerivedDataExecutorPool
Shared pool for all DD computations of all EDT contexts
  • Method Details

    • activate

      void activate()
      Activates the inactive pool. The single pool instance mustn't be activated more then once. The pool should be in inactive state prior the start call
    • cancelNonPriorityTasks

      void cancelNonPriorityTasks(DerivedDataSegmentBucket stageToReset)
      Cancels all non-priority tasks being executed at the moment, starting from a provided stage. If no stage is provided - reset all non-priority tasks
      Parameters:
      stageToReset - Stage to reset. May be null
    • cancelAllTasks

      void cancelAllTasks(IDerivedDataTaskSupplier taskSupplier)
      Cancels tasks of a specific supplier if any
      Parameters:
      taskSupplier - The task supplier. Cannot be null
    • deactivate

      void deactivate()
      Deactivates the active pool. The single pool instance mustn't be deactivated more then once. The pool should be in active state prior the stop call
    • scheduleDispatchingProcess

      void scheduleDispatchingProcess(Runnable runnable)
      Schedules the dispatching process. This activity should be performed once during the start of the DD infrastructure
      Parameters:
      runnable - The dispatching runnable. Cannot be null
    • scheduleTaskIfPossible

      boolean scheduleTaskIfPossible(IDerivedDataTaskSupplier taskSupplier, Object notificationHandle)
      Schedules the task for the execution inside the pool if possible
      Parameters:
      taskSupplier - The target task supplier for the scheduled task. Cannot be null
      notificationHandle - The notification handle. The execution process will notify the scheduler using this handle after the task is finished
      Returns:
      True if the scheduling was successfull
    • setPermittedThreads

      void setPermittedThreads(int permittedThreads)
      Sets the maximum number of computation threads the DD subsystem should use at the moment. It's up to client to control reduction/increasing the number of used threads, the DD subsystem itself won't adjust the maximum number of used threads (though could use less then maximum in any given moment)
      Parameters:
      permittedThreads - The number of permitted threads. Must be a positive number