Class MLPendingAckStore
java.lang.Object
org.apache.pulsar.broker.transaction.pendingack.impl.MLPendingAckStore
- All Implemented Interfaces:
PendingAckStore
The implement of the pending ack store by manageLedger.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMLPendingAckStore(ManagedLedger managedLedger, ManagedCursor cursor, ManagedCursor subManagedCursor, long transactionPendingAckLogIndexMinLag, TxnLogBufferedWriterConfig bufferedWriterConfig, io.netty.util.Timer timer, TxnLogBufferedWriterMetricsStats bufferedWriterMetrics, Executor executor) -
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, Position 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<Position, Integer>> positions) Append the individual pending ack operation to the ack persistent store.Close the transaction pending ack store.static Stringstatic StringgetTransactionPendingAckStoreSuffix(String originTopicName, String subName) voidreplayAsync(PendingAckHandleImpl pendingAckHandle, ExecutorService transactionReplayExecutor) Replay pending ack to recover the pending ack subscription pending ack state.
-
Field Details
-
maxAckPosition
-
-
Constructor Details
-
MLPendingAckStore
public MLPendingAckStore(ManagedLedger managedLedger, ManagedCursor cursor, ManagedCursor subManagedCursor, long transactionPendingAckLogIndexMinLag, TxnLogBufferedWriterConfig bufferedWriterConfig, io.netty.util.Timer timer, TxnLogBufferedWriterMetricsStats bufferedWriterMetrics, Executor executor)
-
-
Method Details
-
replayAsync
public void replayAsync(PendingAckHandleImpl pendingAckHandle, ExecutorService transactionReplayExecutor) Description copied from interface:PendingAckStoreReplay pending ack to recover the pending ack subscription pending ack state.- Specified by:
replayAsyncin interfacePendingAckStore- Parameters:
pendingAckHandle- the handle of pending acktransactionReplayExecutor- the replay executor service
-
closeAsync
Description copied from interface:PendingAckStoreClose the transaction pending ack store.- Specified by:
closeAsyncin interfacePendingAckStore- 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<Position, Integer>> positions) Description copied from interface:PendingAckStoreAppend the individual pending ack operation to the ack persistent store.- Specified by:
appendIndividualAckin interfacePendingAckStore- Parameters:
txnID-TxnIDtransaction id.positions-Listthe 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, Position position) Description copied from interface:PendingAckStoreAppend the cumulative pending ack operation to the ack persistent store.- Specified by:
appendCumulativeAckin interfacePendingAckStore- Parameters:
txnID-TxnIDtransaction id.position-Positionthe 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:PendingAckStoreAppend the pending ack commit mark to the ack persistent store.- Specified by:
appendCommitMarkin interfacePendingAckStore- 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
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:PendingAckStoreAppend the pending ack abort mark to the ack persistent store.- Specified by:
appendAbortMarkin interfacePendingAckStore- Parameters:
txnID-Positionthe txnIDackType-CommandAck.AckTypethe ack type of the abort.- Returns:
- a future represents the result of this operation
-
getManagedLedger
-
getTransactionPendingAckStoreSuffix
-
getTransactionPendingAckStoreCursorName
-