public class TransactionEntryImpl extends Object implements TransactionEntry
TransactionEntry.| Constructor and Description |
|---|
TransactionEntryImpl(org.apache.pulsar.client.api.transaction.TxnID txnId,
long sequenceId,
Entry entry,
long committedAtLedgerId,
long committedAtEntryId,
int numMessageInTxn) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the entry to release the resource that it holds.
|
long |
committedAtEntryId()
The entry id that the transaction is committed to.
|
long |
committedAtLedgerId()
The ledger id that the transaction is committed to.
|
byte[] |
getData() |
byte[] |
getDataAndRelease() |
io.netty.buffer.ByteBuf |
getDataBuffer() |
Entry |
getEntry()
Returns the entry saved in the
TransactionBuffer. |
long |
getEntryId() |
long |
getLedgerId() |
int |
getLength() |
Position |
getPosition() |
int |
getStartBatchIndex() |
int |
numMessageInTxn() |
boolean |
release() |
long |
sequenceId()
The sequence id of this entry in this transaction.
|
void |
setStartBatchIndex(int startBatchIndex) |
org.apache.pulsar.client.api.transaction.TxnID |
txnId()
The transaction id that the entry is appended to.
|
public TransactionEntryImpl(org.apache.pulsar.client.api.transaction.TxnID txnId,
long sequenceId,
Entry entry,
long committedAtLedgerId,
long committedAtEntryId,
int numMessageInTxn)
public org.apache.pulsar.client.api.transaction.TxnID txnId()
TransactionEntrytxnId in interface TransactionEntrypublic long sequenceId()
TransactionEntrysequenceId in interface TransactionEntrypublic int numMessageInTxn()
numMessageInTxn in interface TransactionEntrypublic long committedAtLedgerId()
TransactionEntrycommittedAtLedgerId in interface TransactionEntrypublic long committedAtEntryId()
TransactionEntrycommittedAtEntryId in interface TransactionEntrypublic Entry getEntry()
TransactionEntryTransactionBuffer.getEntry in interface TransactionEntryEntry.public void setStartBatchIndex(int startBatchIndex)
public int getStartBatchIndex()
public void close()
TransactionEntryclose in interface AutoCloseableclose in interface TransactionEntrypublic byte[] getDataAndRelease()
getDataAndRelease in interface Entrypublic io.netty.buffer.ByteBuf getDataBuffer()
getDataBuffer in interface Entrypublic Position getPosition()
getPosition in interface Entrypublic long getLedgerId()
getLedgerId in interface Entrypublic long getEntryId()
getEntryId in interface EntryCopyright © 2017–2021 Apache Software Foundation. All rights reserved.