use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.
the class PollOperation method run.
@Override
public void run() {
QueueContainer queueContainer = getContainer();
item = queueContainer.poll();
if (item != null) {
response = item.getData();
}
}
use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.
the class QueueReplicationOperation method run.
@Override
public void run() {
QueueService service = getService();
NodeEngine nodeEngine = getNodeEngine();
Config config = nodeEngine.getConfig();
for (Map.Entry<String, QueueContainer> entry : migrationData.entrySet()) {
String name = entry.getKey();
QueueContainer container = entry.getValue();
QueueConfig conf = config.findQueueConfig(name);
container.setConfig(conf, nodeEngine, service);
service.addContainer(name, container);
}
}
use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.
the class QueueReplicationOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
out.writeInt(migrationData.size());
for (Map.Entry<String, QueueContainer> entry : migrationData.entrySet()) {
out.writeUTF(entry.getKey());
QueueContainer container = entry.getValue();
container.writeData(out);
}
}
use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.
the class RemainingCapacityOperation method run.
@Override
public void run() {
QueueContainer queueContainer = getContainer();
response = queueContainer.getConfig().getMaxSize() - queueContainer.size();
}
use of com.hazelcast.collection.impl.queue.QueueContainer in project hazelcast by hazelcast.
the class DrainBackupOperation method run.
@Override
public void run() throws Exception {
QueueContainer queueContainer = getContainer();
queueContainer.drainFromBackup(itemIdSet);
}
Aggregations