Search in sources :

Example 11 with QueueContainer

use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.

the class DrainOperation method run.

@Override
public void run() throws Exception {
    QueueContainer queueContainer = getContainer();
    dataMap = queueContainer.drain(maxSize);
    response = new SerializableList(new ArrayList<Data>(dataMap.values()));
}
Also used : SerializableList(com.hazelcast.spi.impl.SerializableList) QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer) ArrayList(java.util.ArrayList)

Example 12 with QueueContainer

use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.

the class TxnOfferOperation method run.

@Override
public void run() throws Exception {
    QueueContainer createContainer = getContainer();
    response = createContainer.txnCommitOffer(getItemId(), data, false);
}
Also used : QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer)

Example 13 with QueueContainer

use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.

the class TxnPollOperation method run.

@Override
public void run() throws Exception {
    QueueContainer queueContainer = getContainer();
    data = queueContainer.txnCommitPoll(getItemId());
    response = data != null;
}
Also used : QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer)

Example 14 with QueueContainer

use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.

the class TxnPrepareBackupOperation method run.

@Override
public void run() throws Exception {
    QueueContainer queueContainer = getContainer();
    for (long itemId : itemIds) {
        boolean remove = CollectionTxnUtil.isRemove(itemId);
        queueContainer.txnEnsureBackupReserve(Math.abs(itemId), transactionId, remove);
    }
}
Also used : QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer)

Example 15 with QueueContainer

use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.

the class TxnReservePollBackupOperation method run.

@Override
public void run() throws Exception {
    QueueContainer queueContainer = getContainer();
    queueContainer.txnPollBackupReserve(itemId, transactionId);
}
Also used : QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer)

Aggregations

QueueContainer (com.hazelcast.collection.impl.queue.QueueContainer)34 SerializableList (com.hazelcast.spi.impl.SerializableList)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 QueueItem (com.hazelcast.collection.impl.queue.QueueItem)1 QueueService (com.hazelcast.collection.impl.queue.QueueService)1 Config (com.hazelcast.config.Config)1 QueueConfig (com.hazelcast.config.QueueConfig)1 Data (com.hazelcast.nio.serialization.Data)1 NodeEngine (com.hazelcast.spi.NodeEngine)1 ProxyService (com.hazelcast.spi.ProxyService)1 ArrayList (java.util.ArrayList)1