Interface Transaction
-
- All Known Implementing Classes:
BindingsTransactionImpl,TransactionImpl
public interface TransactionAn ActiveMQ Artemis internal transaction
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTransaction.State
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddOperation(TransactionOperation sync)voidafterStore(TransactionOperation sync)This is an operation that will be called right after the storage is completed.voidcommit()voidcommit(boolean onePhase)RefsOperationcreateRefsOperation(Queue queue, AckReason reason)List<TransactionOperation>getAllOperations()longgetCreateTime()longgetID()ObjectgetProperty(int index)ObjectgetProtocolData()Transaction.StategetState()XidgetXid()booleanhasTimedOut()To validate if the Transaction had previously timed out.booleanhasTimedOut(long currentTime, int defaultTimeout)booleanisContainsPersistent()booleanisEffective()voidmarkAsRollbackOnly(ActiveMQException exception)voidprepare()voidputProperty(int index, Object property)voidresume()voidrollback()voidsetContainsPersistent()voidsetProtocolData(Object data)Protocol managers can use this field to store any object needed.voidsetState(Transaction.State state)voidsetTimeout(int timeout)voidsuspend()booleantryRollback()In a ServerSession failure scenario,\ we may try to rollback, however only if it's not prepared.
-
-
-
Method Detail
-
getProtocolData
Object getProtocolData()
-
setProtocolData
void setProtocolData(Object data)
Protocol managers can use this field to store any object needed. An example would be the Session used by the transaction on openwire
-
isEffective
boolean isEffective()
-
tryRollback
boolean tryRollback()
In a ServerSession failure scenario,\ we may try to rollback, however only if it's not prepared. In case it's prepared, we will just let it be and let the transaction manager to deal with it
-
getID
long getID()
-
getXid
Xid getXid()
-
suspend
void suspend()
-
resume
void resume()
-
getState
Transaction.State getState()
-
setState
void setState(Transaction.State state)
-
markAsRollbackOnly
void markAsRollbackOnly(ActiveMQException exception)
-
getCreateTime
long getCreateTime()
-
addOperation
void addOperation(TransactionOperation sync)
-
afterStore
void afterStore(TransactionOperation sync)
This is an operation that will be called right after the storage is completed. addOperation could only happen after paging and replication, while these operations will just be about the storage
-
getAllOperations
List<TransactionOperation> getAllOperations()
-
hasTimedOut
boolean hasTimedOut(long currentTime, int defaultTimeout)
-
hasTimedOut
boolean hasTimedOut()
To validate if the Transaction had previously timed out. This is to check the reason why a TX has been rolled back.
-
putProperty
void putProperty(int index, Object property)
-
getProperty
Object getProperty(int index)
-
isContainsPersistent
boolean isContainsPersistent()
-
setContainsPersistent
void setContainsPersistent()
-
setTimeout
void setTimeout(int timeout)
-
createRefsOperation
RefsOperation createRefsOperation(Queue queue, AckReason reason)
-
-