E - public interface IQueue<E> extends BlockingQueue<E>, BaseQueue<E>, ICollection<E>
BaseQueue,
Queue,
BlockingQueue,
TransactionalQueue| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
int |
drainTo(Collection<? super E> c) |
int |
drainTo(Collection<? super E> c,
int maxElements) |
E |
element() |
LocalQueueStats |
getLocalQueueStats()
Returns LocalQueueStats for this queue.
|
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
offer(E e)
Inserts the specified element into this queue if it is possible to do
so immediately without violating capacity restrictions, returning
true upon success and false if no space is currently
available.
|
boolean |
offer(E e,
long timeout,
TimeUnit unit)
Inserts the specified element into this queue, waiting up to the
specified wait time if necessary for space to become available.
|
E |
peek() |
E |
poll()
Retrieves and removes the head of this queue,
or returns null if this queue is empty.
|
E |
poll(long timeout,
TimeUnit unit)
Retrieves and removes the head of this queue, waiting up to the
specified wait time if necessary for an element to become available.
|
void |
put(E e) |
int |
remainingCapacity() |
E |
remove() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size()
Returns the number of elements in this collection.
|
E |
take()
Retrieves and removes the head of this queue, waiting if necessary
until an element becomes available.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
equals, hashCodeaddItemListener, getName, removeItemListenerdestroy, getId, getPartitionKey, getServiceNameboolean add(E e)
add in interface BlockingQueue<E>add in interface Collection<E>add in interface Queue<E>boolean offer(E e)
void put(E e) throws InterruptedException
put in interface BlockingQueue<E>InterruptedExceptionboolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BaseQueue<E>offer in interface BlockingQueue<E>e - the element to addtimeout - how long to wait before giving up, in units of
unitunit - a TimeUnit determining how to interpret the
timeout parameterInterruptedException - if interrupted while waitingE take() throws InterruptedException
take in interface BaseQueue<E>take in interface BlockingQueue<E>InterruptedException - if interrupted while waitingE poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BaseQueue<E>poll in interface BlockingQueue<E>timeout - how long to wait before giving up, in units of
unitunit - a TimeUnit determining how to interpret the
timeout parameterInterruptedException - if interrupted while waitingint remainingCapacity()
remainingCapacity in interface BlockingQueue<E>boolean remove(Object o)
remove in interface BlockingQueue<E>remove in interface Collection<E>boolean contains(Object o)
contains in interface BlockingQueue<E>contains in interface Collection<E>int drainTo(Collection<? super E> c)
drainTo in interface BlockingQueue<E>int drainTo(Collection<? super E> c, int maxElements)
drainTo in interface BlockingQueue<E>E poll()
int size()
boolean isEmpty()
isEmpty in interface Collection<E>Iterator<E> iterator()
The view's iterator is a "weakly consistent" iterator, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
Object[] toArray()
toArray in interface Collection<E><T> T[] toArray(T[] a)
toArray in interface Collection<E>boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>void clear()
clear in interface Collection<E>LocalQueueStats getLocalQueueStats()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.