Class DerivedDataExecutorPool

java.lang.Object
com._1c.g5.v8.internal.derived.scheduler.DerivedDataExecutorPool
All Implemented Interfaces:
IDerivedDataExecutorPool

public class DerivedDataExecutorPool extends Object implements IDerivedDataExecutorPool
Shared pool for all DD computation processes of all registered projects.
  • 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 interface IDerivedDataExecutorPool
    • cancelNonPriorityTasks

      public void cancelNonPriorityTasks(DerivedDataSegmentBucket stageToReset)
      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 interface IDerivedDataExecutorPool
      Parameters:
      stageToReset - Stage to reset. May be null
    • cancelAllTasks

      public void cancelAllTasks(IDerivedDataTaskSupplier taskSupplier)
      Description copied from interface: IDerivedDataExecutorPool
      Cancels tasks of a specific supplier if any
      Specified by:
      cancelAllTasks in interface IDerivedDataExecutorPool
      Parameters:
      taskSupplier - The task supplier. Cannot be null
    • 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 interface IDerivedDataExecutorPool
    • scheduleDispatchingProcess

      public void scheduleDispatchingProcess(Runnable runnable)
      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 interface IDerivedDataExecutorPool
      Parameters:
      runnable - The dispatching runnable. Cannot be null
    • 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 interface IDerivedDataExecutorPool
      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

      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 interface IDerivedDataExecutorPool
      Parameters:
      permittedThreads - The number of permitted threads. Must be a positive number