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.TransactionImpl
AMQP 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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.core.transaction.Transaction
org.apache.activemq.artemis.core.transaction.Transaction.State -
Field Summary
Fields inherited from class org.apache.activemq.artemis.core.transaction.impl.TransactionImpl
containsPersistent, id, state, storageManager, xid -
Constructor Summary
ConstructorsConstructorDescriptionProtonTransactionImpl(Xid xid, org.apache.activemq.artemis.core.persistence.StorageManager storageManager, int timeoutSeconds, AMQPConnectionContext connection) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDelivery(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) voidMap<org.apache.activemq.artemis.core.server.MessageReference, Pair<org.apache.qpid.proton.engine.Delivery, ProtonServerSenderContext>> booleanvoidrollback()Methods inherited from class org.apache.activemq.artemis.core.transaction.impl.TransactionImpl
addOperation, afterCommit, afterStore, afterWired, commit, delay, delayDone, doCommit, doRollback, getAllOperations, getCreateTime, getID, getPendingDelay, getProperty, getProtocolData, getRequiredConsistency, getState, getXid, hasTimedOut, hasTimedOut, isAsync, isContainsPersistent, isEffective, markAsRollbackOnly, prepare, putProperty, resume, setAsync, setContainsPersistent, setProtocolData, setState, setTimeout, suspend, toString, tryRollbackMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.core.transaction.Transaction
isAllowPageTransaction
-
Constructor Details
-
ProtonTransactionImpl
public ProtonTransactionImpl(Xid xid, org.apache.activemq.artemis.core.persistence.StorageManager storageManager, int timeoutSeconds, AMQPConnectionContext connection)
-
-
Method Details
-
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
-
addDelivery
public void addDelivery(org.apache.qpid.proton.engine.Delivery delivery, ProtonServerSenderContext context) -
getDeliveries
public Map<org.apache.activemq.artemis.core.server.MessageReference, Pair<org.apache.qpid.proton.engine.Delivery, ProtonServerSenderContext>> getDeliveries() -
commit
-
isDischarged
public boolean isDischarged() -
discharge
public void discharge()
-