Examples of QueueContainer


Examples of com.hazelcast.queue.QueueContainer

    public WaitNotifyKey getWaitKey() {
        return getOrCreateContainer().getPollWaitNotifyKey();
    }

    public boolean shouldWait() {
        final QueueContainer container = getOrCreateContainer();
        return getWaitTimeout() != 0 && (container.size() + container.txMapSize()) == 0;
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        this.pollOperation = pollOperation;
        this.transactionId = transactionId;
    }

    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        if (pollOperation) {
            container.txnPollBackupReserve(itemId, transactionId);
        } else {
            container.txnOfferBackupReserve(itemId, transactionId);
        }
        response = true;
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        this.txSize = txSize;
        this.transactionId = transactionId;
    }

    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        if (container.hasEnoughCapacity(txSize+1)) {
            response = container.txnOfferReserve(transactionId);
        }
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

    public WaitNotifyKey getWaitKey() {
        return getOrCreateContainer().getOfferWaitNotifyKey();
    }

    public boolean shouldWait() {
        QueueContainer container = getOrCreateContainer();
        return getWaitTimeout() != 0 && !container.hasEnoughCapacity(txSize+1);
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        name = reader.readUTF("n");
    }

    public Object call() throws Exception {
        QueueService service = getService();
        QueueContainer container = service.getOrCreateContainer(name, false);
        return container.getConfig().getMaxSize() - container.size();
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

    }

    @Override
    public Object call() throws Exception {
        QueueService service = getService();
        QueueContainer container = service.getOrCreateContainer(name, false);
        return container.getConfig().getMaxSize() - container.size();
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        this.itemId = itemId;
    }

    @Override
    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        data = container.txnCommitPoll(itemId);
        response = data != null;
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        return Boolean.TRUE.equals(response);
    }

    @Override
    public WaitNotifyKey getNotifiedKey() {
        QueueContainer container = getOrCreateContainer();
        return container.getOfferWaitNotifyKey();
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        this.transactionId = transactionId;
    }

    @Override
    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        response = container.txnPollReserve(reservedOfferId, transactionId);
    }
View Full Code Here

Examples of com.hazelcast.queue.QueueContainer

        response = container.txnPollReserve(reservedOfferId, transactionId);
    }

    @Override
    public WaitNotifyKey getWaitKey() {
        QueueContainer container = getOrCreateContainer();
        return container.getPollWaitNotifyKey();
    }
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.