E
- public interface IQueue<E> extends BlockingQueue<E>, BaseQueue<E>, ICollection<E>
The IQueue is not a partitioned data-structure. All the content of an IQueue is stored in a single machine (and in the backup). The IQueue will not scale by adding more members to the cluster.
BaseQueue
,
Queue
,
BlockingQueue
,
TransactionalQueue
Modifier and Type | Method and Description |
---|---|
LocalQueueStats |
getLocalQueueStats()
Returns LocalQueueStats for this queue.
|
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.
|
E |
take()
Retrieves and removes the head of this queue, waiting if necessary
until an element becomes available.
|
add, contains, drainTo, drainTo, offer, offer, put, remainingCapacity, remove
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
addItemListener, getName, removeItemListener
destroy, getPartitionKey, getServiceName
E poll()
BaseQueue
E poll(long timeout, TimeUnit unit) throws InterruptedException
BaseQueue
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 waitingE take() throws InterruptedException
BaseQueue
take
in interface BaseQueue<E>
take
in interface BlockingQueue<E>
InterruptedException
- if interrupted while waitingLocalQueueStats getLocalQueueStats()
Copyright © 2018 Hazelcast, Inc.. All rights reserved.