public class PreOrderAllocator<T extends Request<T>> extends PriorityIterableBasedRequestAllocator<T>
RequestAllocator that operates over PushDownRequestors, getting a pre-ordered iterator of
Requests from each Requestor and merging them, stopping as soon as the ResourcePool is
exhausted.
This RequestAllocator is ideal when computing the ResourceRequirement of a Request is
expensive, as the pre-ordering allows it to not compute ResourceRequirements for low priority
Requests.
| Modifier and Type | Class and Description |
|---|---|
static class |
PreOrderAllocator.Factory |
| Constructor and Description |
|---|
PreOrderAllocator(RequestAllocatorConfig<T> configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected Iterator<T> |
getJoinIterator(Iterator<? extends Requestor<T>> requestors,
ConcurrentBoundedPriorityIterable<T> requestIterable) |
allocateRequests, getRejectedAndDroppedRequestspublic PreOrderAllocator(RequestAllocatorConfig<T> configuration)
protected Iterator<T> getJoinIterator(Iterator<? extends Requestor<T>> requestors, ConcurrentBoundedPriorityIterable<T> requestIterable)
getJoinIterator in class PriorityIterableBasedRequestAllocator<T extends Request<T>>