Interface TransactionCursor


public interface TransactionCursor
The transaction Cursor maintains the index of all transactions.
  • Method Details

    • getTxnMeta

      CompletableFuture<TransactionMeta> getTxnMeta(org.apache.pulsar.client.api.transaction.TxnID txnID, boolean createIfNotExist)
      Get the specified transaction meta.
      Parameters:
      txnID -
      createIfNotExist -
      Returns:
    • commitTxn

      CompletableFuture<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

      CompletableFuture<Void> abortTxn(org.apache.pulsar.client.api.transaction.TxnID txnID)
      Abort transaction.
      Parameters:
      txnID - aborted transaction id.
      Returns:
    • getAllTxnsCommittedAtLedger

      CompletableFuture<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

      CompletableFuture<Void> removeTxnsCommittedAtLedger(long ledgerId)
      Remove the transactions on the specified ledger.
      Parameters:
      ledgerId - the remove transaction id
      Returns: