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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final long
private DelayQueue<ConstantDelayQueue.DelayedElement<E>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) int
drainTo
(Collection<? super E> c) int
drainTo
(Collection<? super E> c, int maxElements) element()
boolean
isEmpty()
iterator()
boolean
boolean
peek()
poll()
void
int
remove()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
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, wait
Methods 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:
size
in interfaceCollection<E>
-
isEmpty
- Specified by:
isEmpty
in interfaceCollection<E>
-
iterator
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E>
-
clear
- Specified by:
clear
in interfaceCollection<E>
-
add
- Specified by:
add
in interfaceBlockingQueue<E>
- Specified by:
add
in interfaceCollection<E>
- Specified by:
add
in interfaceQueue<E>
-
offer
-
put
- Specified by:
put
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
-
offer
- Specified by:
offer
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
-
take
- Specified by:
take
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
-
poll
- Specified by:
poll
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
-
remainingCapacity
- Specified by:
remainingCapacity
in interfaceBlockingQueue<E>
-
remove
- Specified by:
remove
in interfaceBlockingQueue<E>
- Specified by:
remove
in interfaceCollection<E>
-
contains
- Specified by:
contains
in interfaceBlockingQueue<E>
- Specified by:
contains
in interfaceCollection<E>
-
drainTo
- Specified by:
drainTo
in interfaceBlockingQueue<E>
-
drainTo
- Specified by:
drainTo
in interfaceBlockingQueue<E>
-