public class ClientTxnQueueProxy<E> extends Object implements TransactionalQueue<E>
| Constructor and Description |
|---|
ClientTxnQueueProxy(String name,
TransactionContextProxy proxy) |
| Modifier and Type | Method and Description |
|---|---|
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 partition 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, returning
true upon success and false if no space is currently
available.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, getId, getPartitionKeypublic ClientTxnQueueProxy(String name, TransactionContextProxy proxy)
public boolean offer(E e)
TransactionalQueuepublic boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
TransactionalQueueoffer 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 determining how to interpret the
timeout parameterInterruptedException - if interrupted while waitingpublic E poll()
TransactionalQueuepublic E poll(long timeout, TimeUnit unit) throws InterruptedException
TransactionalQueuepoll 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 parameterInterruptedException - if interrupted while waitingpublic E peek()
TransactionalQueuepeek in interface TransactionalQueue<E>public E peek(long timeout, TimeUnit unit) throws InterruptedException
TransactionalQueuepeek in interface TransactionalQueue<E>InterruptedExceptionpublic int size()
TransactionalQueuepublic String getName()
DistributedObjectgetName in interface DistributedObjectpublic String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectpublic final void destroy()
DistributedObjectdestroy in interface DistributedObjectpublic Object getId()
DistributedObjectgetId in interface DistributedObjectpublic String getPartitionKey()
DistributedObjectgetPartitionKey in interface DistributedObjectCopyright © 2021 Hazelcast, Inc.. All rights reserved.