|
|
|
@ -36,16 +36,10 @@ import com.google.common.base.Preconditions;
|
|
|
|
|
*/ |
|
|
|
|
public class StandByTaskInstancePriorityQueue implements TaskPriorityQueue<TaskInstance> { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* queue size |
|
|
|
|
*/ |
|
|
|
|
private static final Integer QUEUE_MAX_SIZE = 3000; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* queue |
|
|
|
|
*/ |
|
|
|
|
private final PriorityQueue<TaskInstance> queue = |
|
|
|
|
new PriorityQueue<>(QUEUE_MAX_SIZE, new TaskInstancePriorityComparator()); |
|
|
|
|
private final PriorityQueue<TaskInstance> queue = new PriorityQueue<>(new TaskInstancePriorityComparator()); |
|
|
|
|
private final Set<String> taskInstanceIdentifySet = Collections.synchronizedSet(new HashSet<>()); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|