public class JournalCompleteRecordTX extends JournalInternalRecord
A transaction record (Commit or Prepare), will hold the number of elements the transaction has on each file.
For example, a transaction was spread along 3 journal files with 10 pendingTransactions on each file. (What could happen if there are too many pendingTransactions, or if an user event delayed pendingTransactions to come in time to a single file).
The element-summary will then have
FileID1, 10
FileID2, 10
FileID3, 10
During the load, the transaction needs to have 30 pendingTransactions spread across the files as originally written.
If for any reason there are missing pendingTransactions, that means the transaction was not completed and we should ignore the whole transaction
We can't just use a global counter as reclaiming could delete files after the transaction was successfully committed. That also means not having a whole file on journal-reload doesn't mean we have to invalidate the transaction
| Modifier and Type | Field and Description |
|---|---|
long |
txID |
compactCount, fileID| Constructor and Description |
|---|
JournalCompleteRecordTX(boolean isCommit,
long txID,
EncodingSupport transactionData) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(HornetQBuffer buffer) |
int |
getEncodeSize() |
int |
getNumberOfRecords() |
void |
setNumberOfRecords(int records) |
decode, getCompactCount, getFileID, setCompactCount, setFileIDpublic JournalCompleteRecordTX(boolean isCommit,
long txID,
EncodingSupport transactionData)
public void encode(HornetQBuffer buffer)
public void setNumberOfRecords(int records)
setNumberOfRecords in class JournalInternalRecordpublic int getNumberOfRecords()
getNumberOfRecords in class JournalInternalRecordpublic int getEncodeSize()
getEncodeSize in interface EncodingSupportgetEncodeSize in class JournalInternalRecordCopyright © 2012 JBoss by Red Hat. All Rights Reserved.