public class GridQueue<E> extends AbstractCollection<E> implements Queue<E>
This queue is not thread-safe.
Modifier and Type | Class and Description |
---|---|
static class |
GridQueue.Node<E>
Node for internal linked list.
|
Constructor and Description |
---|
GridQueue()
Creates empty queue.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
E |
element() |
Iterator<E> |
iterator() |
boolean |
offer(E e) |
GridQueue.Node<E> |
offerx(E e)
Same as
offer(Object) , but returns created node. |
E |
peek() |
GridQueue.Node<E> |
peekx() |
E |
poll()
Polls element from head of the queue.
|
E |
remove() |
boolean |
remove(Object o) |
int |
size()
Gets queue size.
|
void |
unlink(GridQueue.Node<E> n)
Unlinks node from the queue.
|
addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
public boolean add(E e)
add
in interface Collection<E>
add
in interface Queue<E>
add
in class AbstractCollection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in class AbstractCollection<E>
public GridQueue.Node<E> offerx(E e)
offer(Object)
, but returns created node.e
- Element to add.@Nullable public E poll()
public GridQueue.Node<E> peekx()
public void unlink(GridQueue.Node<E> n)
n
- Node to unlink.public int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017