public abstract class TransactionalQueueProxySupport extends TransactionalDistributedObject<QueueService> implements TransactionalObject
| Modifier and Type | Field and Description |
|---|---|
protected QueueConfig |
config |
protected String |
name |
protected int |
partitionId |
txPARTITIONING_STRATEGY| Modifier | Constructor and Description |
|---|---|
protected |
TransactionalQueueProxySupport(NodeEngine nodeEngine,
QueueService service,
String name,
Transaction tx) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkTransactionState() |
String |
getName()
Returns the unique name for this DistributedObject.
|
String |
getServiceName()
Returns the service name for this object.
|
boolean |
offerInternal(Data data,
long timeout)
Tries to accomodate one more item in the queue in addition to the
already offered items.
|
Data |
peekInternal(long timeout) |
Data |
pollInternal(long timeout) |
int |
size() |
toObjectIfNeededdestroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, postDestroy, preDestroy, throwNotActiveException, toData, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getPartitionKeyprotected final String name
protected final int partitionId
protected final QueueConfig config
protected TransactionalQueueProxySupport(NodeEngine nodeEngine, QueueService service, String name, Transaction tx)
protected void checkTransactionState()
public boolean offerInternal(Data data, long timeout)
TransactionalQueue#offer operation
and adds the commit operation to the transaction log.data - the serialised item being offeredtimeout - the wait timeout in milliseconds for the offer reservationtrue if the item reservation was madeTxnReserveOfferOperation,
TxnOfferOperationpublic Data pollInternal(long timeout)
public Data peekInternal(long timeout)
public int size()
public String getName()
DistributedObjectDistributedObjectUtil.getName(DistributedObject)
because this might be also a PrefixedDistributedObject.getName in interface DistributedObjectpublic final String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectgetServiceName in class AbstractDistributedObject<QueueService>Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.