Interface TransactionEntry
- All Superinterfaces:
AutoCloseable,org.apache.bookkeeper.mledger.Entry
- All Known Implementing Classes:
TransactionEntryImpl
A class represents an entry appended to a transaction.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the entry to release the resource that it holds.longThe entry id that the transaction is committed to.longThe ledger id that the transaction is committed to.org.apache.bookkeeper.mledger.EntrygetEntry()Returns the entry saved in theTransactionBuffer.intlongThe sequence id of this entry in this transaction.org.apache.pulsar.client.api.transaction.TxnIDtxnId()The transaction id that the entry is appended to.Methods inherited from interface org.apache.bookkeeper.mledger.Entry
getData, getDataAndRelease, getDataBuffer, getEntryId, getLedgerId, getLength, getPosition, release
-
Method Details
-
txnId
org.apache.pulsar.client.api.transaction.TxnID txnId()The transaction id that the entry is appended to.- Returns:
- the transaction id
-
sequenceId
long sequenceId()The sequence id of this entry in this transaction.- Returns:
- the sequence id
-
numMessageInTxn
int numMessageInTxn() -
committedAtLedgerId
long committedAtLedgerId()The ledger id that the transaction is committed to.- Returns:
- the ledger id that the transaction is committed to.
-
committedAtEntryId
long committedAtEntryId()The entry id that the transaction is committed to.- Returns:
- the entry id that the transaction is committed to.
-
getEntry
org.apache.bookkeeper.mledger.Entry getEntry()Returns the entry saved in theTransactionBuffer.- Returns:
- the
Entry.
-
close
void close()Close the entry to release the resource that it holds.- Specified by:
closein interfaceAutoCloseable
-