|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.client.txn.proxy.ClientTxnQueueProxy<E>
public class ClientTxnQueueProxy<E>
Constructor Summary | |
---|---|
ClientTxnQueueProxy(String name,
TransactionContextProxy proxy)
|
Method Summary | |
---|---|
void |
destroy()
Destroys this object cluster-wide. |
Object |
getId()
Returns the unique id for this object. |
String |
getName()
Returns the unique name for this DistributedObject. |
String |
getPartitionKey()
Returns the key of the partition that this DistributedObject is assigned to. |
String |
getServiceName()
Returns the service name for this object. |
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 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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.hazelcast.core.DistributedObject |
---|
destroy, getId, getPartitionKey |
Constructor Detail |
---|
public ClientTxnQueueProxy(String name, TransactionContextProxy proxy)
Method Detail |
---|
public boolean offer(E e)
TransactionalQueue
offer
in interface BaseQueue<E>
offer
in interface TransactionalQueue<E>
e
- the element to add
public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
TransactionalQueue
offer
in interface BaseQueue<E>
offer
in interface TransactionalQueue<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 parameter
InterruptedException
- if interrupted while waitingpublic E take() throws InterruptedException
TransactionalQueue
take
in interface BaseQueue<E>
take
in interface TransactionalQueue<E>
InterruptedException
- if interrupted while waitingpublic E poll()
TransactionalQueue
poll
in interface BaseQueue<E>
poll
in interface TransactionalQueue<E>
public E poll(long timeout, TimeUnit unit) throws InterruptedException
TransactionalQueue
poll
in interface BaseQueue<E>
poll
in interface TransactionalQueue<E>
timeout
- how long to wait before giving up, in units of
unitunit
- a TimeUnit determining how to interpret the
timeout parameter
InterruptedException
- if interrupted while waitingpublic E peek()
TransactionalQueue
peek
in interface TransactionalQueue<E>
public E peek(long timeout, TimeUnit unit) throws InterruptedException
TransactionalQueue
peek
in interface TransactionalQueue<E>
InterruptedException
public int size()
TransactionalQueue
size
in interface BaseQueue<E>
size
in interface TransactionalQueue<E>
public String getName()
DistributedObject
getName
in interface DistributedObject
public String getServiceName()
DistributedObject
getServiceName
in interface DistributedObject
public final void destroy()
DistributedObject
destroy
in interface DistributedObject
public Object getId()
DistributedObject
getId
in interface DistributedObject
public String getPartitionKey()
DistributedObject
IAtomicLong
. For a partitioned data structure like an IMap
,
the returned value will not be null, but otherwise undefined.
getPartitionKey
in interface DistributedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |