Class DerivedDataExecutorPool
java.lang.Object
com._1c.g5.v8.internal.derived.scheduler.DerivedDataExecutorPool
- All Implemented Interfaces:
IDerivedDataExecutorPool
Shared pool for all DD computation processes of all registered projects.
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
DerivedDataExecutorPool
public DerivedDataExecutorPool()
-
-
Method Details
-
activate
public void activate()Description copied from interface:IDerivedDataExecutorPoolActivates 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- Specified by:
activatein interfaceIDerivedDataExecutorPool
-
cancelNonPriorityTasks
Description copied from interface:IDerivedDataExecutorPoolCancels all non-priority tasks being executed at the moment, starting from a provided stage. If no stage is provided - reset all non-priority tasks- Specified by:
cancelNonPriorityTasksin interfaceIDerivedDataExecutorPool- Parameters:
stageToReset- Stage to reset. May benull
-
cancelAllTasks
Description copied from interface:IDerivedDataExecutorPoolCancels tasks of a specific supplier if any- Specified by:
cancelAllTasksin interfaceIDerivedDataExecutorPool- Parameters:
taskSupplier- The task supplier. Cannot benull
-
deactivate
public void deactivate()Description copied from interface:IDerivedDataExecutorPoolDeactivates 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- Specified by:
deactivatein interfaceIDerivedDataExecutorPool
-
scheduleDispatchingProcess
Description copied from interface:IDerivedDataExecutorPoolSchedules the dispatching process. This activity should be performed once during the start of the DD infrastructure- Specified by:
scheduleDispatchingProcessin interfaceIDerivedDataExecutorPool- Parameters:
runnable- The dispatching runnable. Cannot benull
-
scheduleTaskIfPossible
public boolean scheduleTaskIfPossible(IDerivedDataTaskSupplier taskSupplier, Object notificationHandle) Description copied from interface:IDerivedDataExecutorPoolSchedules the task for the execution inside the pool if possible- Specified by:
scheduleTaskIfPossiblein interfaceIDerivedDataExecutorPool- 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
public void setPermittedThreads(int permittedThreads) Description copied from interface:IDerivedDataExecutorPoolSets 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)- Specified by:
setPermittedThreadsin interfaceIDerivedDataExecutorPool- Parameters:
permittedThreads- The number of permitted threads. Must be a positive number
-