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() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
equals, hashCode
addItemListener, getName, removeItemListener
destroy, getId, getPartitionKey, getServiceName
boolean 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>
InterruptedException
boolean 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 BlockingQueue<E>
InterruptedException
E 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>
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 © 2014 Hazelcast, Inc.. All Rights Reserved.