Package ai.preferred.venom.job
Class LazyScheduler
- java.lang.Object
-
- ai.preferred.venom.job.LazyScheduler
-
- All Implemented Interfaces:
QueueScheduler,java.lang.Iterable<Job>,java.util.Collection<Job>,java.util.concurrent.BlockingQueue<Job>,java.util.Queue<Job>
@Deprecated public class LazyScheduler extends java.lang.Object implements QueueScheduler
Deprecated.Deprecated, will be removed in the next release. Please use LazyPriorityQueueScheduler instead
-
-
Constructor Summary
Constructors Constructor Description LazyScheduler(java.util.Iterator<Request> requests)Deprecated.Constructs an instance of lazy scheduler without a default handler.LazyScheduler(java.util.Iterator<Request> requests, Handler handler)Deprecated.Constructs an instance of lazy scheduler with a default handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanadd(Job job)Deprecated.booleanaddAll(java.util.Collection<? extends Job> c)Deprecated.voidclear()Deprecated.booleancontains(java.lang.Object o)Deprecated.booleancontainsAll(java.util.Collection<?> c)Deprecated.intdrainTo(java.util.Collection<? super Job> c)Deprecated.intdrainTo(java.util.Collection<? super Job> c, int maxElements)Deprecated.Jobelement()Deprecated.booleanequals(java.lang.Object o)Deprecated.SchedulergetScheduler()Deprecated.Get the scheduler to add jobs.inthashCode()Deprecated.booleanisEmpty()Deprecated.java.util.Iterator<Job>iterator()Deprecated.booleanoffer(Job job)Deprecated.booleanoffer(Job job, long timeout, java.util.concurrent.TimeUnit unit)Deprecated.Jobpeek()Deprecated.Jobpoll()Deprecated.Jobpoll(long timeout, java.util.concurrent.TimeUnit unit)Deprecated.voidput(Job job)Deprecated.intremainingCapacity()Deprecated.Jobremove()Deprecated.booleanremove(java.lang.Object o)Deprecated.booleanremoveAll(java.util.Collection<?> c)Deprecated.booleanretainAll(java.util.Collection<?> c)Deprecated.intsize()Deprecated.Jobtake()Deprecated.java.lang.Object[]toArray()Deprecated.<T> T[]toArray(T[] a)Deprecated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
LazyScheduler
public LazyScheduler(java.util.Iterator<Request> requests, Handler handler)
Deprecated.Constructs an instance of lazy scheduler with a default handler.- Parameters:
requests- An iterator to obtain requestshandler- The default handler to use
-
LazyScheduler
public LazyScheduler(java.util.Iterator<Request> requests)
Deprecated.Constructs an instance of lazy scheduler without a default handler.- Parameters:
requests- An iterator to obtain requests
-
-
Method Detail
-
getScheduler
public final Scheduler getScheduler()
Deprecated.Description copied from interface:QueueSchedulerGet the scheduler to add jobs.- Specified by:
getSchedulerin interfaceQueueScheduler- Returns:
- an instance of Scheduler
-
add
public final boolean add(@Nonnull Job job)Deprecated.
-
offer
public final boolean offer(@Nonnull Job job)Deprecated.
-
element
public final Job element()
Deprecated.- Specified by:
elementin interfacejava.util.Queue<Job>
-
put
public final void put(@Nonnull Job job) throws java.lang.InterruptedExceptionDeprecated.- Specified by:
putin interfacejava.util.concurrent.BlockingQueue<Job>- Throws:
java.lang.InterruptedException
-
offer
public final boolean offer(Job job, long timeout, @Nonnull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Deprecated.- Specified by:
offerin interfacejava.util.concurrent.BlockingQueue<Job>- Throws:
java.lang.InterruptedException
-
take
public final Job take() throws java.lang.InterruptedException
Deprecated.- Specified by:
takein interfacejava.util.concurrent.BlockingQueue<Job>- Throws:
java.lang.InterruptedException
-
poll
public final Job poll(long timeout, @Nonnull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Deprecated.- Specified by:
pollin interfacejava.util.concurrent.BlockingQueue<Job>- Throws:
java.lang.InterruptedException
-
remainingCapacity
public final int remainingCapacity()
Deprecated.- Specified by:
remainingCapacityin interfacejava.util.concurrent.BlockingQueue<Job>
-
remove
public final boolean remove(java.lang.Object o)
Deprecated.
-
containsAll
public final boolean containsAll(@Nonnull java.util.Collection<?> c)Deprecated.- Specified by:
containsAllin interfacejava.util.Collection<Job>
-
addAll
public final boolean addAll(@Nonnull java.util.Collection<? extends Job> c)Deprecated.- Specified by:
addAllin interfacejava.util.Collection<Job>
-
removeAll
public final boolean removeAll(@Nonnull java.util.Collection<?> c)Deprecated.- Specified by:
removeAllin interfacejava.util.Collection<Job>
-
retainAll
public final boolean retainAll(@Nonnull java.util.Collection<?> c)Deprecated.- Specified by:
retainAllin interfacejava.util.Collection<Job>
-
clear
public final void clear()
Deprecated.- Specified by:
clearin interfacejava.util.Collection<Job>
-
equals
public final boolean equals(java.lang.Object o)
Deprecated.- Specified by:
equalsin interfacejava.util.Collection<Job>- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
Deprecated.- Specified by:
hashCodein interfacejava.util.Collection<Job>- Overrides:
hashCodein classjava.lang.Object
-
size
public final int size()
Deprecated.- Specified by:
sizein interfacejava.util.Collection<Job>
-
isEmpty
public final boolean isEmpty()
Deprecated.- Specified by:
isEmptyin interfacejava.util.Collection<Job>
-
contains
public final boolean contains(java.lang.Object o)
Deprecated.
-
iterator
public final java.util.Iterator<Job> iterator()
Deprecated.
-
toArray
public final java.lang.Object[] toArray()
Deprecated.- Specified by:
toArrayin interfacejava.util.Collection<Job>
-
toArray
public final <T> T[] toArray(@Nonnull T[] a)Deprecated.- Specified by:
toArrayin interfacejava.util.Collection<Job>
-
drainTo
public final int drainTo(@Nonnull java.util.Collection<? super Job> c)Deprecated.- Specified by:
drainToin interfacejava.util.concurrent.BlockingQueue<Job>
-
-