Search in sources :

Example 26 with QueueContainer

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

the class ContainsOperation method run.

@Override
public void run() throws Exception {
    QueueContainer queueContainer = getContainer();
    response = queueContainer.contains(dataList);
}
Also used : QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer)

Example 27 with QueueContainer

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

the class IsEmptyOperation method run.

@Override
public void run() throws Exception {
    QueueContainer queueContainer = getContainer();
    response = queueContainer.size() == 0;
}
Also used : QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer)

Example 28 with QueueContainer

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

the class IteratorOperation method run.

@Override
public void run() {
    QueueContainer queueContainer = getContainer();
    List<Data> dataList = queueContainer.getAsDataList();
    response = new SerializableList(dataList);
}
Also used : SerializableList(com.hazelcast.spi.impl.SerializableList) QueueContainer(com.hazelcast.collection.impl.queue.QueueContainer) Data(com.hazelcast.nio.serialization.Data)

Example 29 with QueueContainer

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

the class OfferBackupOperation method run.

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

Example 30 with QueueContainer

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

the class OfferOperation method run.

@Override
public void run() {
    QueueContainer queueContainer = getContainer();
    if (queueContainer.hasEnoughCapacity()) {
        itemId = queueContainer.offer(data);
        response = true;
    } else {
        response = false;
    }
}
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