@Beta
public interface TransactionMetadataStore
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
addAckedPartitionToTxn(org.apache.pulsar.client.api.transaction.TxnID txnid,
List<TransactionSubscription> partitions)
Add the acked partitions to transaction identified by txnid.
|
CompletableFuture<Void> |
addProducedPartitionToTxn(org.apache.pulsar.client.api.transaction.TxnID txnid,
List<String> partitions)
Add the produced partitions to transaction identified by txnid.
|
CompletableFuture<Void> |
closeAsync()
Close the transaction metadata store.
|
TransactionCoordinatorStats |
getCoordinatorStats()
Get the transaction metadata store stats.
|
default long |
getLowWaterMark()
Get the low water mark of this tc, in order to delete unless transaction in transaction buffer and pending ack.
|
TransactionMetadataStoreStats |
getMetadataStoreStats()
Get the transaction metadata store stats.
|
List<TxnMeta> |
getSlowTransactions(long timeout)
Get the transactions witch timeout is bigger than given timeout.
|
TransactionCoordinatorID |
getTransactionCoordinatorID()
Get the transaction coordinator id.
|
CompletableFuture<TxnMeta> |
getTxnMeta(org.apache.pulsar.client.api.transaction.TxnID txnid)
Query the
TxnMeta of a given transaction txnid. |
default CompletableFuture<TxnStatus> |
getTxnStatus(org.apache.pulsar.client.api.transaction.TxnID txnid)
Query the
TxnStatus of a given transaction txnid. |
CompletableFuture<org.apache.pulsar.client.api.transaction.TxnID> |
newTransaction(long timeoutInMills)
Create a new transaction in the transaction metadata store.
|
CompletableFuture<Void> |
updateTxnStatus(org.apache.pulsar.client.api.transaction.TxnID txnid,
TxnStatus newStatus,
TxnStatus expectedStatus,
boolean isTimeout)
Update the transaction from expectedStatus to newStatus.
|
default CompletableFuture<TxnStatus> getTxnStatus(org.apache.pulsar.client.api.transaction.TxnID txnid)
TxnStatus of a given transaction txnid.txnid - transaction idTxnStatus of the given transaction.CompletableFuture<TxnMeta> getTxnMeta(org.apache.pulsar.client.api.transaction.TxnID txnid)
TxnMeta of a given transaction txnid.txnid - transaction idTxnMeta of the given transaction.CompletableFuture<org.apache.pulsar.client.api.transaction.TxnID> newTransaction(long timeoutInMills)
timeoutInMills - the timeout duration of the transaction in millsTxnID as the identifier for identifying the
transaction.CompletableFuture<Void> addProducedPartitionToTxn(org.apache.pulsar.client.api.transaction.TxnID txnid, List<String> partitions)
txnid - transaction idpartitions - the list of partitions that a transaction produces toCompletableFuture<Void> addAckedPartitionToTxn(org.apache.pulsar.client.api.transaction.TxnID txnid, List<TransactionSubscription> partitions)
txnid - transaction idpartitions - the list of partitions that a transaction acknowledge toCompletableFuture<Void> updateTxnStatus(org.apache.pulsar.client.api.transaction.TxnID txnid, TxnStatus newStatus, TxnStatus expectedStatus, boolean isTimeout)
If the current transaction status is not expectedStatus, the update will be failed.
txnid - TxnID for update txn statusnewStatus - the new txn status that the transaction should be updated toexpectedStatus - the expected status that the transaction should beisTimeout - the update txn status operation is it timeoutdefault long getLowWaterMark()
long the lowWaterMarkTransactionCoordinatorID getTransactionCoordinatorID()
TransactionCoordinatorStats getCoordinatorStats()
TransactionCoordinatorStatsCompletableFuture<Void> closeAsync()
TransactionMetadataStoreStats getMetadataStoreStats()
TransactionMetadataStoreStatsCopyright © 2017–2021 Apache Software Foundation. All rights reserved.