Package kieker.monitoring.queue
Class BlockingQueueDecorator<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
kieker.monitoring.queue.BlockingQueueDecorator<E>
- Type Parameters:
E- the type of the elements in the given queue
- All Implemented Interfaces:
Iterable<E>,Collection<E>,BlockingQueue<E>,Queue<E>
A wrapper to provide a given queue a strategy to put and to take possibly in blocking mode.
- Since:
- 1.13
- Author:
- Christian Wulf
-
Constructor Summary
ConstructorsConstructorDescriptionBlockingQueueDecorator(Queue<E> q, PutStrategy putStrategy, TakeStrategy takeStrategy) -
Method Summary
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods 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
-
BlockingQueueDecorator
-
-
Method Details
-
put
- Specified by:
putin interfaceBlockingQueue<E>- Throws:
InterruptedException
-
offer
-
take
- Specified by:
takein interfaceBlockingQueue<E>- Throws:
InterruptedException
-
poll
-
offer
- Specified by:
offerin 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>
-
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>
-
toString
- Overrides:
toStringin classAbstractCollection<E>
-