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>
@InterfaceAudience.Private
public class CallQueue
- extends Object
- implements BlockingQueue<Runnable>
A BlockingQueue reports waiting time in queue and queue length to
ThriftMetrics.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CallQueue
public CallQueue(BlockingQueue<CallQueue.Call> underlyingQueue,
ThriftMetrics metrics)
poll
public Runnable poll()
- Specified by:
poll
in interface Queue<Runnable>
poll
public Runnable poll(long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
poll
in interface BlockingQueue<Runnable>
- Throws:
InterruptedException
remove
public Runnable remove()
- Specified by:
remove
in interface Queue<Runnable>
take
public Runnable take()
throws InterruptedException
- Specified by:
take
in interface BlockingQueue<Runnable>
- Throws:
InterruptedException
drainTo
public int drainTo(Collection<? super Runnable> destination)
- Specified by:
drainTo
in interface BlockingQueue<Runnable>
drainTo
public int drainTo(Collection<? super Runnable> destination,
int maxElements)
- Specified by:
drainTo
in interface BlockingQueue<Runnable>
offer
public boolean offer(Runnable element)
- Specified by:
offer
in interface BlockingQueue<Runnable>
- Specified by:
offer
in interface Queue<Runnable>
offer
public boolean offer(Runnable element,
long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
offer
in interface BlockingQueue<Runnable>
- Throws:
InterruptedException
put
public void put(Runnable element)
throws InterruptedException
- Specified by:
put
in interface BlockingQueue<Runnable>
- Throws:
InterruptedException
add
public boolean add(Runnable element)
- Specified by:
add
in interface Collection<Runnable>
- Specified by:
add
in interface BlockingQueue<Runnable>
- Specified by:
add
in interface Queue<Runnable>
addAll
public boolean addAll(Collection<? extends Runnable> elements)
- Specified by:
addAll
in interface Collection<Runnable>
element
public Runnable element()
- Specified by:
element
in interface Queue<Runnable>
peek
public Runnable peek()
- Specified by:
peek
in interface Queue<Runnable>
clear
public void clear()
- Specified by:
clear
in interface Collection<Runnable>
containsAll
public boolean containsAll(Collection<?> elements)
- Specified by:
containsAll
in interface Collection<Runnable>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection<Runnable>
iterator
public Iterator<Runnable> iterator()
- Specified by:
iterator
in interface Iterable<Runnable>
- Specified by:
iterator
in interface Collection<Runnable>
removeAll
public boolean removeAll(Collection<?> elements)
- Specified by:
removeAll
in interface Collection<Runnable>
retainAll
public boolean retainAll(Collection<?> elements)
- Specified by:
retainAll
in interface Collection<Runnable>
size
public int size()
- Specified by:
size
in interface Collection<Runnable>
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection<Runnable>
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArray
in interface Collection<Runnable>
contains
public boolean contains(Object element)
- Specified by:
contains
in interface Collection<Runnable>
- Specified by:
contains
in interface BlockingQueue<Runnable>
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacity
in interface BlockingQueue<Runnable>
remove
public boolean remove(Object element)
- Specified by:
remove
in interface Collection<Runnable>
- Specified by:
remove
in interface BlockingQueue<Runnable>
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.