Interface PendingAckStore

All Known Implementing Classes:
InMemoryPendingAckStore, MLPendingAckStore

public interface PendingAckStore
To store transaction pending ack.
  • Method Summary

    Modifier and Type
    Method
    Description
    appendAbortMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
    Append the pending ack abort mark to the ack persistent store.
    appendCommitMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
    Append the pending ack commit mark to the ack persistent store.
    appendCumulativeAck(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.bookkeeper.mledger.impl.PositionImpl position)
    Append the cumulative pending ack operation to the ack persistent store.
    appendIndividualAck(org.apache.pulsar.client.api.transaction.TxnID txnID, List<org.apache.commons.lang3.tuple.MutablePair<org.apache.bookkeeper.mledger.impl.PositionImpl,Integer>> positions)
    Append the individual pending ack operation to the ack persistent store.
    Close the transaction pending ack store.
    void
    replayAsync(PendingAckHandleImpl pendingAckHandle, ExecutorService executorService)
    Replay pending ack to recover the pending ack subscription pending ack state.
  • Method Details

    • replayAsync

      void replayAsync(PendingAckHandleImpl pendingAckHandle, ExecutorService executorService)
      Replay pending ack to recover the pending ack subscription pending ack state.
      Parameters:
      pendingAckHandle - the handle of pending ack
      executorService - the replay executor service
    • closeAsync

      CompletableFuture<Void> closeAsync()
      Close the transaction pending ack store.
      Returns:
      a future represents the result of this operation
    • appendIndividualAck

      CompletableFuture<Void> appendIndividualAck(org.apache.pulsar.client.api.transaction.TxnID txnID, List<org.apache.commons.lang3.tuple.MutablePair<org.apache.bookkeeper.mledger.impl.PositionImpl,Integer>> positions)
      Append the individual pending ack operation to the ack persistent store.
      Parameters:
      txnID - TxnID transaction id.
      positions - List the list of position and batch size.
      Returns:
      a future represents the result of this operation
    • appendCumulativeAck

      CompletableFuture<Void> appendCumulativeAck(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.bookkeeper.mledger.impl.PositionImpl position)
      Append the cumulative pending ack operation to the ack persistent store.
      Parameters:
      txnID - TxnID transaction id.
      position - PositionImpl the pending ack position.
      Returns:
      a future represents the result of this operation
    • appendCommitMark

      CompletableFuture<Void> appendCommitMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
      Append the pending ack commit mark to the ack persistent store.
      Parameters:
      txnID - TxnID the transaction id for add commit mark.
      ackType - CommandAck.AckType the ack type of the commit.
      Returns:
      a future represents the result of this operation
    • appendAbortMark

      CompletableFuture<Void> appendAbortMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
      Append the pending ack abort mark to the ack persistent store.
      Parameters:
      txnID - Position the txnID
      ackType - CommandAck.AckType the ack type of the abort.
      Returns:
      a future represents the result of this operation