public class GreedyAllocator<T extends Request<T>> extends PriorityIterableBasedRequestAllocator<T>
RequestAllocator that selects Requests without any order guarantees until the ResourcePool
is full, then stops. This allocator will mostly ignore the prioritizer.
This allocator is useful when there is no prioritization or fairness required. It is generally the fastest and least memory intensive implementation.
| Modifier and Type | Class and Description |
|---|---|
static class |
GreedyAllocator.Factory |
| Constructor and Description |
|---|
GreedyAllocator(RequestAllocatorConfig<T> configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected Iterator<T> |
getJoinIterator(Iterator<? extends Requestor<T>> requestors,
ConcurrentBoundedPriorityIterable<T> requestIterable) |
allocateRequests, getRejectedAndDroppedRequestspublic GreedyAllocator(RequestAllocatorConfig<T> configuration)
protected Iterator<T> getJoinIterator(Iterator<? extends Requestor<T>> requestors, ConcurrentBoundedPriorityIterable<T> requestIterable)
getJoinIterator in class PriorityIterableBasedRequestAllocator<T extends Request<T>>