Class AdjustItemsToScheduleCountTasksProvider

java.lang.Object
de.hybris.platform.task.impl.DelegatingTasksProvider
de.hybris.platform.task.impl.AdjustItemsToScheduleCountTasksProvider
All Implemented Interfaces:
TasksProvider

public class AdjustItemsToScheduleCountTasksProvider extends DelegatingTasksProvider
This class adjusts the number of items that should be provided by a delegated tasks provider. The implementation is not modifying the value returned by the DelegatingTasksProvider.getMaxItemsToSchedule(DefaultTaskService.TaskEngineRunningState, RuntimeConfigHolder) - the items returned by calling getTasksToSchedule(RuntimeConfigHolder, TaskEngineParameters, int) should be buffered (with ex. BufferedTasksProvider or handled in some other way.
  • Constructor Details

    • AdjustItemsToScheduleCountTasksProvider

      public AdjustItemsToScheduleCountTasksProvider(TasksProvider delegate, de.hybris.platform.task.impl.RuntimeConfigHolder.IntTaskEngineProperty relativeMaxItemsToScheduleMultiplier)
  • Method Details

    • getTasksToSchedule

      public List<TasksProvider.VersionPK> getTasksToSchedule(RuntimeConfigHolder runtimeConfigHolder, TaskEngineParameters taskEngineParameters, int maxItemsToSchedule)
      Description copied from interface: TasksProvider
      The method should return a collection of tasks' PKs, that should be scheduled in this node's task engine.
      Specified by:
      getTasksToSchedule in interface TasksProvider
      Overrides:
      getTasksToSchedule in class DelegatingTasksProvider
      Parameters:
      runtimeConfigHolder - a simple services that holds the config properties used by tasks provider
      taskEngineParameters - parameters of task engine that should be taken into
      maxItemsToSchedule - number of items that should (at maximum) be returned by tasks provider
      Returns:
      collection of tasks' PKs