Package ai.preferred.venom.job
Class AbstractPriorityJobQueue
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<Job>
-
- ai.preferred.venom.job.AbstractJobQueue
-
- ai.preferred.venom.job.AbstractPriorityJobQueue
-
- All Implemented Interfaces:
Iterable<Job>
,Collection<Job>
,BlockingQueue<Job>
,Queue<Job>
- Direct Known Subclasses:
LazyPriorityJobQueue
,PriorityJobQueue
public abstract class AbstractPriorityJobQueue extends AbstractJobQueue
- Author:
- Ween Jiann Lee
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPriorityJobQueue()
Constructs an instance of AbstractJobQueue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
offer(Job job)
boolean
offer(Job job, long timeout, TimeUnit unit)
void
put(Job job)
-
Methods inherited from class ai.preferred.venom.job.AbstractJobQueue
drainTo, drainTo, getQueue, iterator, peek, remainingCapacity, size, take
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, poll, remove
-
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
-
-
-
Method Detail
-
put
public final void put(@Nonnull Job job) throws InterruptedException
- Throws:
InterruptedException
-
offer
public final boolean offer(Job job, long timeout, @Nonnull TimeUnit unit) throws InterruptedException
- Throws:
InterruptedException
-
-