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 TypeMethodDescriptionvoid
activate()
Activates the inactive pool.void
cancelAllTasks
(IDerivedDataTaskSupplier taskSupplier) Cancels tasks of a specific supplier if anyvoid
cancelNonPriorityTasks
(DerivedDataSegmentBucket stageToReset) Cancels all non-priority tasks being executed at the moment, starting from a provided stage.void
Deactivates the active pool.void
scheduleDispatchingProcess
(Runnable runnable) Schedules the dispatching process.boolean
scheduleTaskIfPossible
(IDerivedDataTaskSupplier taskSupplier, Object notificationHandle) Schedules the task for the execution inside the pool if possiblevoid
setPermittedThreads
(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:IDerivedDataExecutorPool
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- Specified by:
activate
in interfaceIDerivedDataExecutorPool
-
cancelNonPriorityTasks
Description copied from interface:IDerivedDataExecutorPool
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- Specified by:
cancelNonPriorityTasks
in interfaceIDerivedDataExecutorPool
- Parameters:
stageToReset
- Stage to reset. May benull
-
cancelAllTasks
Description copied from interface:IDerivedDataExecutorPool
Cancels tasks of a specific supplier if any- Specified by:
cancelAllTasks
in interfaceIDerivedDataExecutorPool
- Parameters:
taskSupplier
- The task supplier. Cannot benull
-
deactivate
public void deactivate()Description copied from interface:IDerivedDataExecutorPool
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- Specified by:
deactivate
in interfaceIDerivedDataExecutorPool
-
scheduleDispatchingProcess
Description copied from interface:IDerivedDataExecutorPool
Schedules the dispatching process. This activity should be performed once during the start of the DD infrastructure- Specified by:
scheduleDispatchingProcess
in interfaceIDerivedDataExecutorPool
- Parameters:
runnable
- The dispatching runnable. Cannot benull
-
scheduleTaskIfPossible
public boolean scheduleTaskIfPossible(IDerivedDataTaskSupplier taskSupplier, Object notificationHandle) Description copied from interface:IDerivedDataExecutorPool
Schedules the task for the execution inside the pool if possible- Specified by:
scheduleTaskIfPossible
in interfaceIDerivedDataExecutorPool
- Parameters:
taskSupplier
- The target task supplier for the scheduled task. Cannot benull
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
public void setPermittedThreads(int permittedThreads) Description copied from interface:IDerivedDataExecutorPool
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)- Specified by:
setPermittedThreads
in interfaceIDerivedDataExecutorPool
- Parameters:
permittedThreads
- The number of permitted threads. Must be a positive number
-