public class TaskProcessor extends Object
TaskProcessor.Task
queues.Modifier and Type | Class and Description |
---|---|
static interface |
TaskProcessor.Condition
|
static class |
TaskProcessor.Task
Generic task representation.
|
Constructor and Description |
---|
TaskProcessor() |
Modifier and Type | Method and Description |
---|---|
static void |
processQueue(Queue<TaskProcessor.Task> queue,
TaskProcessor.Condition condition)
Processes as much tasks from the queue as possible.
|
public static void processQueue(Queue<TaskProcessor.Task> queue, TaskProcessor.Condition condition)
queue
- TaskProcessor.Task
queue.condition
- if present, it will be called before every processed TaskProcessor.Task
. When TaskProcessor.Condition.isValid()
returns false
, processing will be terminated. If the condition is not present (parameter
is null
, all tasks from the queue will be processed.Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.