public class BlockingQueue extends Queue
Queue
.Constructor and Description |
---|
BlockingQueue() |
Modifier and Type | Method and Description |
---|---|
void |
add(int idx,
java.lang.Object o) |
boolean |
add(java.lang.Object o) |
boolean |
addAll(java.util.Collection arg0) |
boolean |
addAll(int arg0,
java.util.Collection arg1) |
int |
capacity()
Returns the capacity of this queue.
|
void |
clear()
Clears this queue.
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection arg0) |
java.lang.Object |
element() |
boolean |
equals(java.lang.Object o) |
java.lang.Object |
first()
Returns the first element of the queue.
|
java.lang.Object |
get(int idx) |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty()
Returns
true if the queue is empty. |
java.util.Iterator |
iterator() |
java.lang.Object |
last()
Returns the last element of the queue.
|
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int index) |
boolean |
offer(java.lang.Object o) |
java.lang.Object |
peek() |
java.lang.Object |
poll() |
java.lang.Object |
pop()
Dequeues from this queue.
|
void |
push(java.lang.Object obj)
Enqueue into this queue.
|
java.lang.Object |
remove() |
java.lang.Object |
remove(int idx) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection arg0) |
boolean |
retainAll(java.util.Collection arg0) |
java.lang.Object |
set(int idx,
java.lang.Object o) |
int |
size()
Returns the number of elements in the queue.
|
java.util.List |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] arg0) |
java.lang.String |
toString() |
void |
waitForNewItem()
Waits until any elements are in this queue.
|
public void waitForNewItem() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the current thread is interruptedpublic void push(java.lang.Object obj)
Queue
public void add(int idx, java.lang.Object o)
public boolean add(java.lang.Object o)
public boolean addAll(int arg0, java.util.Collection arg1)
addAll
in interface java.util.List
addAll
in class java.util.AbstractList
public boolean addAll(java.util.Collection arg0)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
addAll
in class java.util.AbstractCollection
public int capacity()
Queue
public void clear()
Queue
public java.lang.Object first()
Queue
public java.lang.Object get(int idx)
public boolean isEmpty()
Queue
true
if the queue is empty.public java.lang.Object last()
Queue
public java.lang.Object pop()
Queue
public int size()
Queue
public java.lang.Object remove(int idx)
public java.lang.Object set(int idx, java.lang.Object o)
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.util.AbstractList
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.util.AbstractList
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
indexOf
in class java.util.AbstractList
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
iterator
in class java.util.AbstractList
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
lastIndexOf
in class java.util.AbstractList
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
listIterator
in class java.util.AbstractList
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
listIterator
in class java.util.AbstractList
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
subList
in class java.util.AbstractList
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
contains
in class java.util.AbstractCollection
public boolean containsAll(java.util.Collection arg0)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
containsAll
in class java.util.AbstractCollection
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
remove
in class java.util.AbstractCollection
public boolean removeAll(java.util.Collection arg0)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
removeAll
in class java.util.AbstractCollection
public boolean retainAll(java.util.Collection arg0)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
retainAll
in class java.util.AbstractCollection
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
toArray
in class java.util.AbstractCollection
public java.lang.Object[] toArray(java.lang.Object[] arg0)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
toArray
in class java.util.AbstractCollection
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.