Class ThresholdBlockingQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
io.nflow.engine.internal.executor.ThresholdBlockingQueue<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,BlockingQueue<E>,Queue<E>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdrainTo(Collection<? super E> c) intdrainTo(Collection<? super E> c, int maxElements) iterator()voidbooleanbooleanpeek()poll()voidintintsize()take()voidwaitUntilQueueSizeLowerThanThreshold(org.joda.time.DateTime waitUntil) Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.BlockingQueue
add, contains, removeMethods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
ThresholdBlockingQueue
public ThresholdBlockingQueue(int capacity, int notifyThreshHold)
-
-
Method Details
-
notifyIfNotFull
public void notifyIfNotFull() -
waitUntilQueueSizeLowerThanThreshold
public void waitUntilQueueSizeLowerThanThreshold(org.joda.time.DateTime waitUntil) throws InterruptedException - Throws:
InterruptedException
-
offer
-
poll
-
peek
-
iterator
- Specified by:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>- Specified by:
iteratorin classAbstractCollection<E>
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein classAbstractCollection<E>
-
put
- Specified by:
putin interfaceBlockingQueue<E>- Throws:
InterruptedException
-
offer
- Specified by:
offerin interfaceBlockingQueue<E>- Throws:
InterruptedException
-
take
- Specified by:
takein interfaceBlockingQueue<E>- Throws:
InterruptedException
-
poll
- Specified by:
pollin interfaceBlockingQueue<E>- Throws:
InterruptedException
-
remainingCapacity
public int remainingCapacity()- Specified by:
remainingCapacityin interfaceBlockingQueue<E>
-
drainTo
- Specified by:
drainToin interfaceBlockingQueue<E>
-
drainTo
- Specified by:
drainToin interfaceBlockingQueue<E>
-