@Beta
public interface TransactionMetadataStore
default CompletableFuture<PulsarTransactionMetadata.TxnStatus> getTxnStatus(org.apache.pulsar.client.api.transaction.TxnID txnid)
PulsarTransactionMetadata.TxnStatus of a given transaction txnid.txnid - transaction idPulsarTransactionMetadata.TxnStatus 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, PulsarTransactionMetadata.TxnStatus newStatus, PulsarTransactionMetadata.TxnStatus expectedStatus)
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 beTransactionCoordinatorID getTransactionCoordinatorID()
CompletableFuture<Void> closeAsync()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.