Package org.apache.hadoop.hbase.thrift
Class CallQueue
java.lang.Object
org.apache.hadoop.hbase.thrift.CallQueue
- All Implemented Interfaces:
Iterable<Runnable>
,Collection<Runnable>
,BlockingQueue<Runnable>
,Queue<Runnable>
A BlockingQueue reports waiting time in queue and queue length to ThriftMetrics.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final ThriftMetrics
private final BlockingQueue<CallQueue.Call>
-
Constructor Summary
ConstructorDescriptionCallQueue
(BlockingQueue<CallQueue.Call> underlyingQueue, ThriftMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends Runnable> elements) void
clear()
boolean
boolean
containsAll
(Collection<?> elements) int
drainTo
(Collection<? super Runnable> destination) int
drainTo
(Collection<? super Runnable> destination, int maxElements) element()
boolean
isEmpty()
iterator()
private static long
now()
boolean
boolean
peek()
poll()
void
int
remove()
boolean
boolean
removeAll
(Collection<?> elements) boolean
retainAll
(Collection<?> elements) int
size()
take()
Object[]
toArray()
<T> T[]
toArray
(T[] array) private void
updateMetrics
(CallQueue.Call result) 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
-
LOG
-
underlyingQueue
-
metrics
-
-
Constructor Details
-
CallQueue
-
-
Method Details
-
now
-
poll
-
updateMetrics
-
poll
- Specified by:
poll
in interfaceBlockingQueue<Runnable>
- Throws:
InterruptedException
-
remove
-
take
- Specified by:
take
in interfaceBlockingQueue<Runnable>
- Throws:
InterruptedException
-
drainTo
- Specified by:
drainTo
in interfaceBlockingQueue<Runnable>
-
drainTo
- Specified by:
drainTo
in interfaceBlockingQueue<Runnable>
-
offer
-
offer
- Specified by:
offer
in interfaceBlockingQueue<Runnable>
- Throws:
InterruptedException
-
put
- Specified by:
put
in interfaceBlockingQueue<Runnable>
- Throws:
InterruptedException
-
add
- Specified by:
add
in interfaceBlockingQueue<Runnable>
- Specified by:
add
in interfaceCollection<Runnable>
- Specified by:
add
in interfaceQueue<Runnable>
-
addAll
- Specified by:
addAll
in interfaceCollection<Runnable>
-
element
-
peek
-
clear
- Specified by:
clear
in interfaceCollection<Runnable>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Runnable>
-
isEmpty
- Specified by:
isEmpty
in interfaceCollection<Runnable>
-
iterator
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Runnable>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Runnable>
-
size
- Specified by:
size
in interfaceCollection<Runnable>
-
toArray
- Specified by:
toArray
in interfaceCollection<Runnable>
-
toArray
- Specified by:
toArray
in interfaceCollection<Runnable>
-
contains
- Specified by:
contains
in interfaceBlockingQueue<Runnable>
- Specified by:
contains
in interfaceCollection<Runnable>
-
remainingCapacity
- Specified by:
remainingCapacity
in interfaceBlockingQueue<Runnable>
-
remove
- Specified by:
remove
in interfaceBlockingQueue<Runnable>
- Specified by:
remove
in interfaceCollection<Runnable>
-