Class PageTransactionInfoImpl
java.lang.Object
org.apache.activemq.artemis.core.paging.impl.PageTransactionInfoImpl
- All Implemented Interfaces:
EncodingSupport,PageTransactionInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckSize(StorageManager storageManager, PagingManager pagingManager) voidcommit()voiddecode(ActiveMQBuffer buffer) booleandeliverAfterCommit(PageIterator iterator, PageSubscription cursor, PagedReference pagedReference) This method will hold the position to be delivered later in case this transaction is pending.voidencode(ActiveMQBuffer buffer) intintlonglongvoidincrement(int durableSize, int nonDurableSize) booleaninternalCheckSize(StorageManager storageManager, PagingManager pagingManager, int size) protected org.apache.activemq.artemis.core.paging.impl.PageTransactionInfoImpl.UpdatePageTXOperationinternalUpdatePageManager(StorageManager storageManager, PagingManager pagingManager, Transaction tx, int increment) booleanisCommit()booleanUsed on PageRebuildManager to cleanup orphaned Page TransactionsbooleanbooleanonUpdate(int update, StorageManager storageManager, PagingManager pagingManager) voidvoidreloadUpdate(StorageManager storageManager, PagingManager pagingManager, Transaction tx, int increment) voidrollback()voidsetCommitted(boolean committed) setOrphaned(boolean orphaned) voidsetRecordID(long recordID) voidstore(StorageManager storageManager, PagingManager pagingManager, Transaction tx) voidstoreUpdate(StorageManager storageManager, PagingManager pagingManager, Transaction tx) toString()
-
Constructor Details
-
PageTransactionInfoImpl
public PageTransactionInfoImpl(long transactionID) -
PageTransactionInfoImpl
public PageTransactionInfoImpl()
-
-
Method Details
-
isOrphaned
public boolean isOrphaned()Description copied from interface:PageTransactionInfoUsed on PageRebuildManager to cleanup orphaned Page Transactions- Specified by:
isOrphanedin interfacePageTransactionInfo
-
setOrphaned
- Specified by:
setOrphanedin interfacePageTransactionInfo
-
getPreparedTransaction
- Specified by:
getPreparedTransactionin interfacePageTransactionInfo
-
getRecordID
public long getRecordID()- Specified by:
getRecordIDin interfacePageTransactionInfo
-
setRecordID
public void setRecordID(long recordID) - Specified by:
setRecordIDin interfacePageTransactionInfo
-
getTransactionID
public long getTransactionID()- Specified by:
getTransactionIDin interfacePageTransactionInfo
-
onUpdate
- Specified by:
onUpdatein interfacePageTransactionInfo
-
checkSize
- Specified by:
checkSizein interfacePageTransactionInfo
-
internalCheckSize
public boolean internalCheckSize(StorageManager storageManager, PagingManager pagingManager, int size) -
increment
public void increment(int durableSize, int nonDurableSize) - Specified by:
incrementin interfacePageTransactionInfo
-
getNumberOfMessages
public int getNumberOfMessages()- Specified by:
getNumberOfMessagesin interfacePageTransactionInfo
-
decode
- Specified by:
decodein interfaceEncodingSupport
-
encode
- Specified by:
encodein interfaceEncodingSupport
-
getEncodeSize
public int getEncodeSize()- Specified by:
getEncodeSizein interfaceEncodingSupport
-
commit
public void commit()- Specified by:
commitin interfacePageTransactionInfo
-
store
public void store(StorageManager storageManager, PagingManager pagingManager, Transaction tx) throws Exception - Specified by:
storein interfacePageTransactionInfo- Throws:
Exception
-
storeUpdate
public void storeUpdate(StorageManager storageManager, PagingManager pagingManager, Transaction tx) throws Exception - Specified by:
storeUpdatein interfacePageTransactionInfo- Throws:
Exception
-
reloadUpdate
public void reloadUpdate(StorageManager storageManager, PagingManager pagingManager, Transaction tx, int increment) throws Exception - Specified by:
reloadUpdatein interfacePageTransactionInfo- Throws:
Exception
-
internalUpdatePageManager
protected org.apache.activemq.artemis.core.paging.impl.PageTransactionInfoImpl.UpdatePageTXOperation internalUpdatePageManager(StorageManager storageManager, PagingManager pagingManager, Transaction tx, int increment) -
isCommit
public boolean isCommit()- Specified by:
isCommitin interfacePageTransactionInfo
-
setCommitted
public void setCommitted(boolean committed) - Specified by:
setCommittedin interfacePageTransactionInfo
-
reloadPrepared
- Specified by:
reloadPreparedin interfacePageTransactionInfo
-
isRollback
public boolean isRollback()- Specified by:
isRollbackin interfacePageTransactionInfo
-
rollback
public void rollback()- Specified by:
rollbackin interfacePageTransactionInfo
-
toString
-
deliverAfterCommit
public boolean deliverAfterCommit(PageIterator iterator, PageSubscription cursor, PagedReference pagedReference) Description copied from interface:PageTransactionInfoThis method will hold the position to be delivered later in case this transaction is pending. If the tx is not pending, it will return false, so the caller can deliver it right away- Specified by:
deliverAfterCommitin interfacePageTransactionInfo- Returns:
- true if the message will be delivered later, false if it should be delivered right away
-