public class PriorityScheduler extends Object implements TaskScheduler
ActorThread maintains a local instance
if this class.| Constructor and Description |
|---|
PriorityScheduler(java.util.function.IntFunction<ActorTask> getTaskFn,
double[] quotas) |
| Modifier and Type | Method and Description |
|---|---|
ActorTask |
getNextTask(ActorClock clock)
calculates and returns the next task to execute or null if no such task can be determined.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonTaskReleasedpublic PriorityScheduler(java.util.function.IntFunction<ActorTask> getTaskFn, double[] quotas)
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.public ActorTask getNextTask(ActorClock clock)
getNextTask in interface TaskSchedulerCopyright © 2017–2019 camunda services GmbH. All rights reserved.