Interface TransactionCursor
-
public interface TransactionCursorThe transaction Cursor maintains the index of all transactions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>abortTxn(org.apache.pulsar.client.api.transaction.TxnID txnID)Abort transaction.java.util.concurrent.CompletableFuture<java.lang.Void>commitTxn(long committedLedgerId, long committedEntryId, org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.bookkeeper.mledger.Position position)Commit transaction.java.util.concurrent.CompletableFuture<java.util.Set<org.apache.pulsar.client.api.transaction.TxnID>>getAllTxnsCommittedAtLedger(long ledgerId)Get all the transaction id on the specified ledger.java.util.concurrent.CompletableFuture<TransactionMeta>getTxnMeta(org.apache.pulsar.client.api.transaction.TxnID txnID, boolean createIfNotExist)Get the specified transaction meta.java.util.concurrent.CompletableFuture<java.lang.Void>removeTxnsCommittedAtLedger(long ledgerId)Remove the transactions on the specified ledger.
-
-
-
Method Detail
-
getTxnMeta
java.util.concurrent.CompletableFuture<TransactionMeta> getTxnMeta(org.apache.pulsar.client.api.transaction.TxnID txnID, boolean createIfNotExist)
Get the specified transaction meta.- Parameters:
txnID-createIfNotExist-- Returns:
-
commitTxn
java.util.concurrent.CompletableFuture<java.lang.Void> commitTxn(long committedLedgerId, long committedEntryId, org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.bookkeeper.mledger.Position position)Commit transaction.- Parameters:
committedLedgerId- the ledger which txn committed at.committedEntryId- the entry which txn committed at.txnID- the id which txn committed.position- the commit position at transaction log.- Returns:
-
abortTxn
java.util.concurrent.CompletableFuture<java.lang.Void> abortTxn(org.apache.pulsar.client.api.transaction.TxnID txnID)
Abort transaction.- Parameters:
txnID- aborted transaction id.- Returns:
-
getAllTxnsCommittedAtLedger
java.util.concurrent.CompletableFuture<java.util.Set<org.apache.pulsar.client.api.transaction.TxnID>> getAllTxnsCommittedAtLedger(long ledgerId)
Get all the transaction id on the specified ledger.- Parameters:
ledgerId- the transaction committed ledger id- Returns:
-
removeTxnsCommittedAtLedger
java.util.concurrent.CompletableFuture<java.lang.Void> removeTxnsCommittedAtLedger(long ledgerId)
Remove the transactions on the specified ledger.- Parameters:
ledgerId- the remove transaction id- Returns:
-
-