Package com.hazelcast.transaction

Examples of com.hazelcast.transaction.TransactionException


    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        if (container.isLocked(dataKey) && !container.unlock(dataKey, getCallerUuid(), threadId)) {
            throw new TransactionException(
                    "Lock is not owned by the transaction! Owner: " + container.getLockOwnerInfo(dataKey)
            );
        }
    }
View Full Code Here


    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        if (container.isLocked(dataKey) && !container.unlock(dataKey, caller, threadId)) {
            throw new TransactionException(
                    "Lock is not owned by the transaction! -> " + container.getLockOwnerInfo(dataKey)
            );
        }
    }
View Full Code Here

        try {
            Future<Long> f = invoke(operation);
            Long itemId = f.get();
            if (itemId != null) {
                if (!itemIdSet.add(itemId)) {
                    throw new TransactionException("Duplicate itemId: " + itemId);
                }
                offeredQueue.offer(new QueueItem(null, itemId, data));
                TxnOfferOperation txnOfferOperation = new TxnOfferOperation(name, itemId, data);
                QueueTransactionLog transactionLog = new QueueTransactionLog(
                        tx.getTxnId(), itemId, name, partitionId, txnOfferOperation);
View Full Code Here

                    itemIdSet.remove(reservedOffer.getItemId());
                    return reservedOffer.getData();
                }
                //
                if (!itemIdSet.add(item.getItemId())) {
                    throw new TransactionException("Duplicate itemId: " + item.getItemId());
                }
                TxnPollOperation op = new TxnPollOperation(name, item.getItemId());
                QueueTransactionLog transactionLog
                        = new QueueTransactionLog(tx.getTxnId(), item.getItemId(), name, partitionId, op);
                tx.addTransactionLog(transactionLog);
View Full Code Here

    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        if (!container.extendLock(dataKey, getCallerUuid(), threadId, LOCK_EXTENSION_TIME_IN_MILLIS)) {
            throw new TransactionException(
                    "Lock is not owned by the transaction! -> " + container.getLockOwnerInfo(dataKey)
            );
        }
        response = true;
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.transaction.TransactionException

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.