public class QueueContainer extends Object implements IdentifiedDataSerializable
Constructor and Description |
---|
QueueContainer(String name) |
QueueContainer(String name,
QueueConfig config,
NodeEngine nodeEngine,
QueueService service) |
Modifier and Type | Method and Description |
---|---|
Map<Long,Data> |
addAll(Collection<Data> dataList) |
void |
addAllBackup(Map<Long,Data> dataMap) |
int |
backupSize() |
void |
cancelEvictionIfExists() |
Map<Long,Data> |
clear() |
void |
clearBackup(Set<Long> itemIdSet) |
Map<Long,Data> |
compareAndRemove(Collection<Data> dataList,
boolean retain)
This method triggers store load
|
void |
compareAndRemoveBackup(Set<Long> itemIdSet) |
boolean |
contains(Collection<Data> dataSet)
This method does not trigger store load.
|
void |
destroy() |
Map<Long,Data> |
drain(int maxSize) |
void |
drainFromBackup(Set<Long> itemIdSet) |
List<Data> |
getAsDataList()
This method triggers store load.
|
QueueConfig |
getConfig() |
Data |
getDataFromMap(long itemId) |
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getId()
Returns type identifier for this class.
|
Deque<QueueItem> |
getItemQueue() |
QueueWaitNotifyKey |
getOfferWaitNotifyKey() |
QueueWaitNotifyKey |
getPollWaitNotifyKey() |
boolean |
hasEnoughCapacity() |
boolean |
hasEnoughCapacity(int delta) |
void |
init(boolean fromBackup) |
boolean |
isEvictable() |
void |
mapDrainIterator(int maxSize,
Map map) |
void |
mapIterateAndRemove(Map map) |
long |
offer(Data data) |
void |
offerBackup(Data data,
long itemId) |
QueueItem |
peek() |
QueueItem |
poll() |
void |
pollBackup(long itemId) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
long |
remove(Data data)
iterates all items, checks equality with data
This method does not trigger store load.
|
void |
removeBackup(long itemId) |
void |
rollbackTransaction(String transactionId) |
void |
setConfig(QueueConfig config,
NodeEngine nodeEngine,
QueueService service) |
void |
setStats(LocalQueueStatsImpl stats) |
int |
size() |
int |
txMapSize() |
boolean |
txnCheckReserve(long itemId) |
boolean |
txnCommitOffer(long itemId,
Data data,
boolean backup) |
Data |
txnCommitPoll(long itemId) |
Data |
txnCommitPollBackup(long itemId) |
void |
txnEnsureBackupReserve(long itemId,
String transactionId,
boolean pollOperation) |
void |
txnOfferBackupReserve(long itemId,
String transactionId) |
long |
txnOfferReserve(String transactionId) |
QueueItem |
txnPeek(long offerId,
String transactionId) |
void |
txnPollBackupReserve(long itemId,
String transactionId) |
QueueItem |
txnPollReserve(long reservedOfferId,
String transactionId) |
boolean |
txnRollbackOffer(long itemId) |
boolean |
txnRollbackOfferBackup(long itemId) |
boolean |
txnRollbackPoll(long itemId,
boolean backup) |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public QueueContainer(String name)
public QueueContainer(String name, QueueConfig config, NodeEngine nodeEngine, QueueService service) throws Exception
Exception
public void init(boolean fromBackup)
public boolean txnCheckReserve(long itemId)
public void txnEnsureBackupReserve(long itemId, String transactionId, boolean pollOperation)
public void txnPollBackupReserve(long itemId, String transactionId)
public Data txnCommitPoll(long itemId)
public Data txnCommitPollBackup(long itemId)
public boolean txnRollbackPoll(long itemId, boolean backup)
public long txnOfferReserve(String transactionId)
public void txnOfferBackupReserve(long itemId, String transactionId)
public boolean txnCommitOffer(long itemId, Data data, boolean backup)
public boolean txnRollbackOffer(long itemId)
public boolean txnRollbackOfferBackup(long itemId)
public long offer(Data data)
public void offerBackup(Data data, long itemId)
public Map<Long,Data> addAll(Collection<Data> dataList)
public QueueItem peek()
public QueueItem poll()
public void pollBackup(long itemId)
public void mapDrainIterator(int maxSize, Map map)
public int size()
public int txMapSize()
public int backupSize()
public long remove(Data data)
public void removeBackup(long itemId)
public boolean contains(Collection<Data> dataSet)
public Map<Long,Data> compareAndRemove(Collection<Data> dataList, boolean retain)
public void mapIterateAndRemove(Map map)
public boolean hasEnoughCapacity()
public boolean hasEnoughCapacity(int delta)
public Data getDataFromMap(long itemId)
public void setConfig(QueueConfig config, NodeEngine nodeEngine, QueueService service)
public QueueWaitNotifyKey getPollWaitNotifyKey()
public QueueWaitNotifyKey getOfferWaitNotifyKey()
public QueueConfig getConfig()
public void setStats(LocalQueueStatsImpl stats)
public void cancelEvictionIfExists()
public boolean isEvictable()
public void rollbackTransaction(String transactionId)
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
public void destroy()
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.