Examples of QueueContainer


Examples of com.hazelcast.queue.QueueContainer

        this.pollOperation = pollOperation;
    }

    @Override
    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        if (pollOperation) {
            response = container.txnRollbackPoll(itemId, true);
        } else {
            response = container.txnRollbackOfferBackup(itemId);
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        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);
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

    @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);
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

    protected void readInternal(ObjectDataInput in) throws IOException {
        int mapSize = in.readInt();
        migrationData = new HashMap<String, QueueContainer>(mapSize);
        for (int i = 0; i < mapSize; i++) {
            String name = in.readUTF();
            QueueContainer container = new QueueContainer(name);
            container.readData(in);
            migrationData.put(name, container);
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        super(name);
    }

    @Override
    public void run() {
        final QueueContainer container = getOrCreateContainer();
        response = container.getConfig().getMaxSize() - container.size();
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        this.retain = retain;
    }

    @Override
    public void run() {
        QueueContainer container = getOrCreateContainer();
        dataMap = container.compareAndRemove(dataList, retain);
        response = dataMap.size() > 0;
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        this.dataList = dataList;
    }

    @Override
    public void run() {
        QueueContainer container = getOrCreateContainer();
        if (container.hasEnoughCapacity()) {
            dataMap = container.addAll(dataList);
            response = true;
        } else {
            response = false;
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        this.maxSize = maxSize;
    }

    @Override
    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        dataMap = container.drain(maxSize);
        response = new SerializableCollection(new ArrayList<Data>(dataMap.values()));
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        this.data = data;
    }

    @Override
    public void run() {
        QueueContainer container = getOrCreateContainer();
        if (container.hasEnoughCapacity()) {
            itemId = container.offer(data);
            response = true;
        } else {
            response = false;
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer

        return getOrCreateContainer().getOfferWaitNotifyKey();
    }

    @Override
    public boolean shouldWait() {
        QueueContainer container = getOrCreateContainer();
        return getWaitTimeout() != 0 && !container.hasEnoughCapacity();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.