E - the type of elements held in this collectionpublic interface TransactionalQueue<E> extends TransactionalObject, com.hazelcast.collection.BaseQueue<E>
BaseQueue.BaseQueue, 
IQueue| Modifier and Type | Method and Description | 
|---|---|
| boolean | offer(E e)Inserts the specified element into this queue if it is possible to do
 so immediately without violating capacity restrictions. | 
| 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 | peek(long timeout,
    TimeUnit unit) | 
| E | poll()Retrieves and removes the head of this queue,
 or returns  nullif 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. | 
| 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. | 
destroy, getName, getPartitionKey, getServiceNameboolean offer(@Nonnull E e)
true upon success and false if no space is currently
 available.offer in interface com.hazelcast.collection.BaseQueue<E>e - the element to addtrue if the element was added to this queue,
         false otherwiseboolean offer(@Nonnull E e, long timeout, @Nonnull TimeUnit unit) throws InterruptedException
offer in interface com.hazelcast.collection.BaseQueue<E>e - the element to addtimeout - how long to wait before giving up, in units of
        unitunit - a TimeUnit determines how to interpret the
        timeout parametertrue if successful, or false if
         the specified waiting time elapses before space is availableInterruptedException - if interrupted while waiting@Nonnull E take() throws InterruptedException
take in interface com.hazelcast.collection.BaseQueue<E>InterruptedException - if interrupted while waitingE poll()
null if this queue is empty.poll in interface com.hazelcast.collection.BaseQueue<E>null if this queue is emptyE poll(long timeout, @Nonnull TimeUnit unit) throws InterruptedException
poll in interface com.hazelcast.collection.BaseQueue<E>timeout - how long to wait before giving up, in units of
        unitunit - a TimeUnit determining how to interpret the
        timeout parameternull if the
         specified waiting time elapses before an element is availableInterruptedException - if interrupted while waitingE peek()
E peek(long timeout, TimeUnit unit) throws InterruptedException
InterruptedExceptionint size()
Integer.MAX_VALUE elements, returns
 Integer.MAX_VALUE.size in interface com.hazelcast.collection.BaseQueue<E>Copyright © 2020 Hazelcast, Inc.. All rights reserved.