Interface IDerivedDataExecutorPool
- All Known Implementing Classes:
DerivedDataExecutorPool,TestPool
public interface IDerivedDataExecutorPool
Shared pool for all DD computations of all EDT contexts
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates the inactive pool.voidcancelAllTasks(IDerivedDataTaskSupplier taskSupplier) Cancels tasks of a specific supplier if anyvoidcancelNonPriorityTasks(DerivedDataSegmentBucket stageToReset) Cancels all non-priority tasks being executed at the moment, starting from a provided stage.voidDeactivates the active pool.voidscheduleDispatchingProcess(Runnable runnable) Schedules the dispatching process.booleanscheduleTaskIfPossible(IDerivedDataTaskSupplier taskSupplier, Object notificationHandle) Schedules the task for the execution inside the pool if possiblevoidsetPermittedThreads(int permittedThreads) Sets the maximum number of computation threads the DD subsystem should use at the moment.
-
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
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 benull
-
cancelAllTasks
Cancels tasks of a specific supplier if any- Parameters:
taskSupplier- The task supplier. Cannot benull
-
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
Schedules the dispatching process. This activity should be performed once during the start of the DD infrastructure- Parameters:
runnable- The dispatching runnable. Cannot benull
-
scheduleTaskIfPossible
Schedules the task for the execution inside the pool if possible- Parameters:
taskSupplier- The target task supplier for the scheduled task. Cannot benullnotificationHandle- 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
-