public class MLPendingAckStore extends Object implements PendingAckStore
| Modifier and Type | Field and Description |
|---|---|
protected PositionImpl |
maxAckPosition |
static String |
PENDING_ACK_STORE_CURSOR_NAME |
static String |
PENDING_ACK_STORE_SUFFIX |
| Constructor and Description |
|---|
MLPendingAckStore(ManagedLedger managedLedger,
ManagedCursor cursor,
ManagedCursor subManagedCursor,
long transactionPendingAckLogIndexMinLag) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
CompletableFuture<Void> |
appendCumulativeAck(org.apache.pulsar.client.api.transaction.TxnID txnID,
PositionImpl position)
Append the cumulative pending ack operation to the ack persistent store.
|
CompletableFuture<Void> |
appendIndividualAck(org.apache.pulsar.client.api.transaction.TxnID txnID,
List<org.apache.commons.lang3.tuple.MutablePair<PositionImpl,Integer>> positions)
Append the individual pending ack operation to the ack persistent store.
|
CompletableFuture<Void> |
closeAsync()
Close the transaction pending ack store.
|
CompletableFuture<ManagedLedger> |
getManagedLedger() |
static String |
getTransactionPendingAckStoreCursorName() |
static String |
getTransactionPendingAckStoreSuffix(String originTopicName,
String subName) |
void |
replayAsync(PendingAckHandleImpl pendingAckHandle,
ScheduledExecutorService transactionReplayExecutor)
Replay pending ack to recover the pending ack subscription pending ack state.
|
public static final String PENDING_ACK_STORE_SUFFIX
public static final String PENDING_ACK_STORE_CURSOR_NAME
protected PositionImpl maxAckPosition
public MLPendingAckStore(ManagedLedger managedLedger, ManagedCursor cursor, ManagedCursor subManagedCursor, long transactionPendingAckLogIndexMinLag)
public void replayAsync(PendingAckHandleImpl pendingAckHandle, ScheduledExecutorService transactionReplayExecutor)
PendingAckStorereplayAsync in interface PendingAckStorependingAckHandle - the handle of pending acktransactionReplayExecutor - the replay executor servicepublic CompletableFuture<Void> closeAsync()
PendingAckStorecloseAsync in interface PendingAckStorepublic CompletableFuture<Void> appendIndividualAck(org.apache.pulsar.client.api.transaction.TxnID txnID, List<org.apache.commons.lang3.tuple.MutablePair<PositionImpl,Integer>> positions)
PendingAckStoreappendIndividualAck in interface PendingAckStoretxnID - TxnID transaction id.positions - List the list of position and batch size.public CompletableFuture<Void> appendCumulativeAck(org.apache.pulsar.client.api.transaction.TxnID txnID, PositionImpl position)
PendingAckStoreappendCumulativeAck in interface PendingAckStoretxnID - TxnID transaction id.position - PositionImpl the pending ack position.public CompletableFuture<Void> appendCommitMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
PendingAckStoreappendCommitMark in interface PendingAckStoretxnID - TxnID the transaction id for add commit mark.ackType - CommandAck.AckType the ack type of the commit.public CompletableFuture<Void> appendAbortMark(org.apache.pulsar.client.api.transaction.TxnID txnID, org.apache.pulsar.common.api.proto.CommandAck.AckType ackType)
PendingAckStoreappendAbortMark in interface PendingAckStoretxnID - Position the txnIDackType - CommandAck.AckType the ack type of the abort.public CompletableFuture<ManagedLedger> getManagedLedger()
public static String getTransactionPendingAckStoreSuffix(String originTopicName, String subName)
public static String getTransactionPendingAckStoreCursorName()
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.