public interface TransactionalQueueCodecTemplate
Modifier and Type | Method and Description |
---|---|
Object |
offer(String name,
String txnId,
long threadId,
Data item,
long timeout)
Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to
become available.
|
Object |
peek(String name,
String txnId,
long threadId,
long timeout)
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
|
Object |
poll(String name,
String txnId,
long threadId,
long timeout)
Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element
to become available.
|
Object |
size(String name,
String txnId,
long threadId)
Returns the number of elements in this collection.If this collection contains more than Integer.MAX_VALUE
elements, returns Integer.MAX_VALUE.
|
Object |
take(String name,
String txnId,
long threadId)
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
|
Object offer(String name, String txnId, long threadId, Data item, long timeout)
name
- Name of the Transcational QueuetxnId
- ID of the transactionthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.item
- The element to addtimeout
- How long to wait before giving up, in millisecondsObject take(String name, String txnId, long threadId)
name
- Name of the Transactional QueuetxnId
- ID of the transactionthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.Object poll(String name, String txnId, long threadId, long timeout)
name
- Name of the Transactional QueuetxnId
- ID of the transactionthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.timeout
- How long to wait before giving up, in millisecondsObject peek(String name, String txnId, long threadId, long timeout)
name
- Name of the Transactional QueuetxnId
- ID of the transactionthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.timeout
- How long to wait before giving up, in millisecondsObject size(String name, String txnId, long threadId)
name
- Name of the Transactional QueuetxnId
- ID of the transactionthreadId
- The id of the user thread performing the operation. It is used to guarantee that only the lock holder thread (if a lock exists on the entry) can perform the requested operation.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.