E
- queue item typepublic 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, getDestroyContextForTenant, getPartitionKey, getServiceName
E poll()
null
if this queue is empty.E poll(long timeout, @Nonnull 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
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availableInterruptedException
- if interrupted while waiting@Nonnull E take() throws InterruptedException
take
in interface BaseQueue<E>
take
in interface BlockingQueue<E>
InterruptedException
- if interrupted while waitingLocalQueueStats getLocalQueueStats()
Copyright © 2023 Hazelcast, Inc.. All rights reserved.