Class InMemoryPendingAckStore

java.lang.Object
org.apache.pulsar.broker.transaction.pendingack.impl.InMemoryPendingAckStore
All Implemented Interfaces:
PendingAckStore

public class InMemoryPendingAckStore extends Object implements PendingAckStore
In memory implementation of PendingAckStore.
  • Constructor Details

    • InMemoryPendingAckStore

      public InMemoryPendingAckStore()
  • Method Details

    • replayAsync

      public void replayAsync(PendingAckHandleImpl pendingAckHandle, ExecutorService scheduledExecutorService)
      Description copied from interface: PendingAckStore
      Replay pending ack to recover the pending ack subscription pending ack state.
      Specified by:
      replayAsync in interface PendingAckStore
      Parameters:
      pendingAckHandle - the handle of pending ack
      scheduledExecutorService - the replay executor service
    • closeAsync

      public CompletableFuture<Void> closeAsync()
      Description copied from interface: PendingAckStore
      Close the transaction pending ack store.
      Specified by:
      closeAsync in interface PendingAckStore
      Returns:
      a future represents the result of this operation
    • appendIndividualAck

      public 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)
      Description copied from interface: PendingAckStore
      Append the individual pending ack operation to the ack persistent store.
      Specified by:
      appendIndividualAck in interface PendingAckStore
      Parameters:
      txnID - TxnID transaction id.
      positions - List the list of position and batch size.
      Returns:
      a future represents the result of this operation
    • appendCumulativeAck

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

      public CompletableFuture<Void> appendCommitMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
      Description copied from interface: PendingAckStore
      Append the pending ack commit mark to the ack persistent store.
      Specified by:
      appendCommitMark in interface PendingAckStore
      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

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