TransactionalQueue¶
-
class
TransactionalQueue(name, transaction, context)¶ Bases:
hazelcast.proxy.base.TransactionalProxyTransactional implementation of
Queue.-
offer(item, timeout=0)¶ Transactional implementation of
Queue.offer(item, timeout)- Parameters
item – The item to be added.
timeout (int) – Maximum time in seconds to wait for addition.
- Returns
Trueif the element was added to this queue,Falseotherwise.- Return type
hazelcast.future.Future[bool]
-
take()¶ Transactional implementation of
Queue.take()- Returns
The head of this queue.
- Return type
-
poll(timeout=0)¶ Transactional implementation of
Queue.poll(timeout)- Parameters
timeout (int) – Maximum time in seconds to wait for addition.
- Returns
- The head of this queue, or
Noneif this queue is empty or specified timeout elapses before an item is added to the queue.
- The head of this queue, or
- Return type
-
peek(timeout=0)¶ Transactional implementation of
Queue.peek(timeout)- Parameters
timeout (int) – Maximum time in seconds to wait for addition.
- Returns
- The head of this queue, or
Noneif this queue is empty or specified timeout elapses before an item is added to the queue.
- The head of this queue, or
- Return type
-
size()¶ Transactional implementation of
Queue.size()- Returns
Size of the queue.
- Return type
-