public class LazyScheduler extends PriorityQueueAbstractScheduler<HandledRequestHolder,ai.preferred.venom.scheduler.BasicPriority>
| Constructor and Description |
|---|
LazyScheduler(Iterator<Request> requests) |
LazyScheduler(Iterator<Request> requests,
Handler handler) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Request r)
Adds a request to the queue
|
void |
add(Request r,
ai.preferred.venom.scheduler.BasicPriority p)
Adds a request to the queue
|
void |
add(Request r,
ai.preferred.venom.scheduler.BasicPriority p,
ai.preferred.venom.scheduler.BasicPriority pf)
Adds a request to the queue
|
void |
add(Request r,
Handleable h)
Adds a request to the queue
|
void |
add(Request r,
Handleable h,
ai.preferred.venom.scheduler.BasicPriority p)
Adds a request to the queue
|
void |
add(Request r,
Handleable h,
ai.preferred.venom.scheduler.BasicPriority p,
ai.preferred.venom.scheduler.BasicPriority pf)
Adds a request to the queue
|
boolean |
isEmpty() |
HandledRequestHolder |
poll() |
HandledRequestHolder |
poll(long time,
TimeUnit unit) |
drainTo, drainTo, getQueue, iterator, offer, offer, peek, put, remainingCapacity, size, takecontains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, removeaddAll, clear, containsAll, equals, hashCode, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArraypublic void add(Request r, Handleable h, ai.preferred.venom.scheduler.BasicPriority p, ai.preferred.venom.scheduler.BasicPriority pf)
SchedulerThis request would be parsed by the handler specified, and its priority can be downgraded to a minimum priority specified
r - request to fetch when dequeuedh - handler to be used to parse the requestp - initial priority of the requestpf - the minimum (floor) priority of this requestpublic void add(Request r, Handleable h, ai.preferred.venom.scheduler.BasicPriority p)
SchedulerThis request would be parsed by the handler specified, and its priority can be downgraded to the default minimum priority
r - request to fetch when dequeuedh - handler to be used to parse the requestp - initial priority of the requestpublic void add(Request r, Handleable h)
SchedulerThis request would be parsed by the handler specified, and it's initialised with default priority that can be downgraded to the default minimum priority
r - request to fetch when dequeuedh - handler to be used to parse the requestpublic void add(Request r, ai.preferred.venom.scheduler.BasicPriority p, ai.preferred.venom.scheduler.BasicPriority pf)
SchedulerThis request would be parsed by a handler defined in HandlerRouter or otherwise, and its priority can be downgraded to a minimum priority specified
r - request to fetch when dequeuedp - initial priority of the requestpf - the minimum (floor) priority of this requestpublic void add(Request r, ai.preferred.venom.scheduler.BasicPriority p)
SchedulerThis request would be parsed by a handler defined in HandlerRouter or otherwise defined, and its priority can be downgraded to the default minimum priority
r - request to fetch when dequeuedp - initial priority of the requestpublic void add(Request r)
SchedulerThis request would be parsed by a handler defined in HandlerRouter or otherwise defined, and it's initialised with default priority that can be downgraded to the default minimum priority
r - request to fetch when dequeuedpublic HandledRequestHolder poll()
poll in interface Queue<HandledRequestHolder>poll in class PriorityQueueAbstractScheduler<HandledRequestHolder,ai.preferred.venom.scheduler.BasicPriority>public HandledRequestHolder poll(long time, @Nonnull TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<HandledRequestHolder>poll in class PriorityQueueAbstractScheduler<HandledRequestHolder,ai.preferred.venom.scheduler.BasicPriority>InterruptedExceptionpublic boolean isEmpty()
isEmpty in interface Collection<HandledRequestHolder>isEmpty in class AbstractCollection<HandledRequestHolder>Copyright © 2018. All rights reserved.