Package org.apache.hadoop.hbase.util
Class ConstantDelayQueue<E>
java.lang.Object
org.apache.hadoop.hbase.util.ConstantDelayQueue<E>
- Type Parameters:
E- type of elements
- All Implemented Interfaces:
Iterable<E>,Collection<E>,BlockingQueue<E>,Queue<E>
A blocking queue implementation for adding a constant delay. Uses a DelayQueue as a backing store
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate DelayQueue<ConstantDelayQueue.DelayedElement<E>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) intdrainTo(Collection<? super E> c) intdrainTo(Collection<? super E> c, int maxElements) element()booleanisEmpty()iterator()booleanbooleanpeek()poll()voidintremove()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()take()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream
-
Field Details
-
delayMs
-
queue
-
-
Constructor Details
-
ConstantDelayQueue
-
-
Method Details
-
remove
-
poll
-
element
-
peek
-
size
- Specified by:
sizein interfaceCollection<E>
-
isEmpty
- Specified by:
isEmptyin interfaceCollection<E>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>
-
clear
- Specified by:
clearin interfaceCollection<E>
-
add
- Specified by:
addin interfaceBlockingQueue<E>- Specified by:
addin interfaceCollection<E>- Specified by:
addin interfaceQueue<E>
-
offer
-
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
- Specified by:
remainingCapacityin interfaceBlockingQueue<E>
-
remove
- Specified by:
removein interfaceBlockingQueue<E>- Specified by:
removein interfaceCollection<E>
-
contains
- Specified by:
containsin interfaceBlockingQueue<E>- Specified by:
containsin interfaceCollection<E>
-
drainTo
- Specified by:
drainToin interfaceBlockingQueue<E>
-
drainTo
- Specified by:
drainToin interfaceBlockingQueue<E>
-