189190191192193194195196197198199
*/ if (!queue.offer(task, 5, java.util.concurrent.TimeUnit.SECONDS)) { saturationPolicy.dealWith(task); } if (task.calculateNextRuntime()) { scheduledTasks.offer(task); } } return nextRunTime;
192193194195196197198199200201202
148149150151152153154155156157158
*/ if (!queue.offer(task)) { throw new QueueOverloadedException("could not schedule task"); } if (task.calculateNextRuntime()) { scheduledTasks.offer(task); } } return nextRunTime;