Interface PendingAckStore
- All Known Implementing Classes:
InMemoryPendingAckStore,MLPendingAckStore
public interface PendingAckStore
To store transaction pending ack.
-
Method Summary
Modifier and TypeMethodDescriptionappendAbortMark(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.voidreplayAsync(PendingAckHandleImpl pendingAckHandle, ExecutorService executorService) Replay pending ack to recover the pending ack subscription pending ack state.
-
Method Details
-
replayAsync
Replay pending ack to recover the pending ack subscription pending ack state.- Parameters:
pendingAckHandle- the handle of pending ackexecutorService- 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-TxnIDtransaction id.positions-Listthe 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-TxnIDtransaction id.position-PositionImplthe 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-TxnIDthe transaction id for add commit mark.ackType-CommandAck.AckTypethe 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-Positionthe txnIDackType-CommandAck.AckTypethe ack type of the abort.- Returns:
- a future represents the result of this operation
-