Interface InternalQueue<E>
- Type Parameters:
E-
- All Superinterfaces:
Collection<E>,Iterable<E>,Queue<E>
- All Known Implementing Classes:
FixedSizeQueue,UnboundedQueue
Interface implemented by the internal queues.
-
Method Summary
Modifier and TypeMethodDescriptionintdrainTo(Collection<? super E> c) Drain items from this queue to the specified collectionintdrainTo(Collection<? super E> c, int maxElements) Drain items from this queue to the specified collectionintReturn the capacity of the queueGet not full conditionintGet the Priority of the queueintRemaining capacity of the queue.voidsetNotFullCond(Condition condition) Get not full conditionvoidsetPriority(int p) Set the priorityMethods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Method Details
-
getPriority
int getPriority()Get the Priority of the queue- Returns:
- priority
-
setPriority
void setPriority(int p) Set the priority- Parameters:
p- priority
-
getNotFullCond
Condition getNotFullCond()Get not full condition- Returns:
- not full condition
-
setNotFullCond
Get not full condition- Parameters:
condition- condition
-
drainTo
Drain items from this queue to the specified collection- Parameters:
c- collection to add item- Returns:
- number of items added
-
drainTo
Drain items from this queue to the specified collection- Parameters:
c- collection to add itemmaxElements- maximum number of element to drain- Returns:
- number of items added
-
remainingCapacity
int remainingCapacity()Remaining capacity of the queue. Unbounded queues should return Integer.MAX_VALUE- Returns:
- remaining capacity
-
getCapacity
int getCapacity()Return the capacity of the queue- Returns:
- capacity of thr queue
-