Class PriorityScheduler

java.lang.Object
io.camunda.zeebe.util.sched.PriorityScheduler
All Implemented Interfaces:
TaskScheduler

public final class PriorityScheduler extends Object implements TaskScheduler
Logic and state for the priority scheduling. Each ActorThread maintains a local instance if this class.
  • Constructor Details

    • PriorityScheduler

      public PriorityScheduler(IntFunction<ActorTask> getTaskFn, double[] quotas)
      Parameters:
      getTaskFn - function which can be used to get a task by a given priority class.
      quotas - the quotas by priority class. Must be an array of doubles, assigning a quota to the priority denoted by the index in the array (if quotas[0] = 0.3, then the quota for the priority class '0' is 0.3). A quota must be a number between [0..1], such that the sum of all quotas in the array is exactly 1. The quota multiplied by 100 corresponds to the number of time slices assigned to this priority class in a second.
  • Method Details