Package com.hazelcast.queue

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


        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

        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

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

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

        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

    }

    @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

        this.itemId = itemId;
    }

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

        return Boolean.TRUE.equals(response);
    }

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

        this.transactionId = transactionId;
    }

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

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

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

TOP

Related Classes of com.hazelcast.queue.QueueContainer

Copyright © 2018 www.massapicom. 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.