TransactionalQueue¶
-
class
TransactionalQueue
(name, transaction)¶ Bases:
hazelcast.proxy.base.TransactionalProxy
Transactional implementation of
Queue
.-
offer
(item, timeout=0)¶ Transactional implementation of
Queue.offer(item, timeout)
Parameters: - item – (object), the item to be added.
- timeout – (long), maximum time in seconds to wait for addition (optional).
Returns: (bool),
true
if the element was added to this queue,false
otherwise.
-
take
()¶ Transactional implementation of
Queue.take()
Returns: (object), the head of this queue.
-
poll
(timeout=0)¶ Transactional implementation of
Queue.poll(timeout)
Parameters: timeout – (long), maximum time in seconds to wait for addition (optional). Returns: (object), the head of this queue, or None
if this queue is empty or specified timeout elapses before anitem is added to the queue.
-
peek
(timeout=0)¶ Transactional implementation of
Queue.peek(timeout)
Parameters: timeout – (long), maximum time in seconds to wait for addition (optional). Returns: (object), the head of this queue, or None
if this queue is empty or specified timeout elapses before anitem is added to the queue.
-
size
()¶ Transactional implementation of
Queue.size()
Returns: (int), size of the queue.
-