Class ProtonTransactionImpl
- java.lang.Object
-
- org.apache.activemq.artemis.core.transaction.impl.TransactionImpl
-
- org.apache.activemq.artemis.protocol.amqp.proton.transaction.ProtonTransactionImpl
-
- All Implemented Interfaces:
org.apache.activemq.artemis.core.transaction.Transaction
public class ProtonTransactionImpl extends org.apache.activemq.artemis.core.transaction.impl.TransactionImplAMQP Protocol has different TX Rollback behaviour for Acks depending on whether an AMQP delivery has been settled or not. This class extends the Core TransactionImpl used for normal TX behaviour. In the case where deliveries have been settled, normal Ack rollback is applied. For cases where deliveries are unsettled and rolled back, we increment the delivery count and return to the consumer.
-
-
Constructor Summary
Constructors Constructor Description ProtonTransactionImpl(javax.transaction.xa.Xid xid, org.apache.activemq.artemis.core.persistence.StorageManager storageManager, int timeoutSeconds, AMQPConnectionContext connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDelivery(org.apache.qpid.proton.engine.Delivery delivery, ProtonServerSenderContext context)voidcommit()org.apache.activemq.artemis.core.server.impl.RefsOperationcreateRefsOperation(org.apache.activemq.artemis.core.server.Queue queue, org.apache.activemq.artemis.core.server.impl.AckReason reason)voiddischarge()java.util.Map<org.apache.activemq.artemis.core.server.MessageReference,org.apache.activemq.artemis.api.core.Pair<org.apache.qpid.proton.engine.Delivery,ProtonServerSenderContext>>getDeliveries()booleanisDischarged()voidrollback()-
Methods inherited from class org.apache.activemq.artemis.core.transaction.impl.TransactionImpl
addOperation, afterCommit, afterStore, commit, doCommit, doRollback, getAllOperations, getCreateTime, getID, getProperty, getProtocolData, getState, getXid, hasTimedOut, hasTimedOut, isContainsPersistent, isEffective, markAsRollbackOnly, prepare, putProperty, resume, setContainsPersistent, setProtocolData, setState, setTimeout, suspend, toString, tryRollback
-
-
-
-
Constructor Detail
-
ProtonTransactionImpl
public ProtonTransactionImpl(javax.transaction.xa.Xid xid, org.apache.activemq.artemis.core.persistence.StorageManager storageManager, int timeoutSeconds, AMQPConnectionContext connection)
-
-
Method Detail
-
createRefsOperation
public org.apache.activemq.artemis.core.server.impl.RefsOperation createRefsOperation(org.apache.activemq.artemis.core.server.Queue queue, org.apache.activemq.artemis.core.server.impl.AckReason reason)- Specified by:
createRefsOperationin interfaceorg.apache.activemq.artemis.core.transaction.Transaction- Overrides:
createRefsOperationin classorg.apache.activemq.artemis.core.transaction.impl.TransactionImpl
-
rollback
public void rollback() throws java.lang.Exception- Specified by:
rollbackin interfaceorg.apache.activemq.artemis.core.transaction.Transaction- Overrides:
rollbackin classorg.apache.activemq.artemis.core.transaction.impl.TransactionImpl- Throws:
java.lang.Exception
-
addDelivery
public void addDelivery(org.apache.qpid.proton.engine.Delivery delivery, ProtonServerSenderContext context)
-
getDeliveries
public java.util.Map<org.apache.activemq.artemis.core.server.MessageReference,org.apache.activemq.artemis.api.core.Pair<org.apache.qpid.proton.engine.Delivery,ProtonServerSenderContext>> getDeliveries()
-
commit
public void commit() throws java.lang.Exception- Specified by:
commitin interfaceorg.apache.activemq.artemis.core.transaction.Transaction- Overrides:
commitin classorg.apache.activemq.artemis.core.transaction.impl.TransactionImpl- Throws:
java.lang.Exception
-
isDischarged
public boolean isDischarged()
-
discharge
public void discharge()
-
-