145146147148149150151152153154155
/** * Sechedule the task for execution. */ if (!queue.offer(task)) { throw new QueueOverloadedException("could not schedule task"); } if (task.calculateNextRuntime()) { scheduledTasks.offer(task); }