use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class TransactionCommitMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
TransactionContext transactionContext = endpoint.getTransactionContext(parameters.transactionId);
transactionContext.commitTransaction();
endpoint.removeTransactionContext(parameters.transactionId);
return null;
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class TransactionRollbackMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
TransactionContext transactionContext = endpoint.getTransactionContext(parameters.transactionId);
transactionContext.rollbackTransaction();
endpoint.removeTransactionContext(parameters.transactionId);
return null;
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class XATransactionPrepareMessageTask method call.
@Override
protected Object call() throws Exception {
String transactionId = parameters.transactionId;
TransactionContext transactionContext = endpoint.getTransactionContext(transactionId);
if (transactionContext == null) {
throw new TransactionException("No transaction context with given transactionId: " + transactionId);
}
Transaction transaction = TransactionAccessor.getTransaction(transactionContext);
transaction.prepare();
return null;
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class XATransactionRollbackMessageTask method call.
@Override
protected Object call() throws Exception {
String transactionId = parameters.transactionId;
TransactionContext transactionContext = endpoint.getTransactionContext(transactionId);
if (transactionContext == null) {
throw new TransactionException("No transaction context with given transactionId: " + transactionId);
}
Transaction transaction = TransactionAccessor.getTransaction(transactionContext);
transaction.rollback();
endpoint.removeTransactionContext(transactionId);
return null;
}
use of com.hazelcast.transaction.TransactionContext in project hazelcast by hazelcast.
the class TransactionalListAddMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
TransactionalList<Object> list = context.getList(parameters.name);
return list.add(parameters.item);
}
Aggregations