Interface PendingAckStore

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.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.
      java.util.concurrent.CompletableFuture<java.lang.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.
      java.util.concurrent.CompletableFuture<java.lang.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.
      java.util.concurrent.CompletableFuture<java.lang.Void> appendIndividualAck​(org.apache.pulsar.client.api.transaction.TxnID txnID, java.util.List<org.apache.commons.lang3.tuple.MutablePair<org.apache.bookkeeper.mledger.impl.PositionImpl,​java.lang.Integer>> positions)
      Append the individual pending ack operation to the ack persistent store.
      java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
      Close the transaction pending ack store.
      void replayAsync​(PendingAckHandleImpl pendingAckHandle, java.util.concurrent.ExecutorService executorService)
      Replay pending ack to recover the pending ack subscription pending ack state.
    • Method Detail

      • replayAsync

        void replayAsync​(PendingAckHandleImpl pendingAckHandle,
                         java.util.concurrent.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

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

        java.util.concurrent.CompletableFuture<java.lang.Void> appendIndividualAck​(org.apache.pulsar.client.api.transaction.TxnID txnID,
                                                                                   java.util.List<org.apache.commons.lang3.tuple.MutablePair<org.apache.bookkeeper.mledger.impl.PositionImpl,​java.lang.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

        java.util.concurrent.CompletableFuture<java.lang.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

        java.util.concurrent.CompletableFuture<java.lang.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

        java.util.concurrent.CompletableFuture<java.lang.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