@Beta
public interface TxnMeta
TransactionMetadataStore.| Modifier and Type | Method and Description |
|---|---|
List<TransactionSubscription> |
ackedPartitions()
Return the the list of partitions that this transaction acknowledges to.
|
TxnMeta |
addAckedPartitions(List<TransactionSubscription> subscriptions)
Add the list of acked partitions to the transaction.
|
TxnMeta |
addProducedPartitions(List<String> partitions)
Add the list of produced partitions to the transaction.
|
long |
getOpenTimestamp()
Return the transaction open timestamp.
|
long |
getTimeoutAt()
Return the transaction timeout at.
|
org.apache.pulsar.client.api.transaction.TxnID |
id()
Return the transaction id.
|
List<String> |
producedPartitions()
Return the the list of partitions that this transaction produces to.
|
TxnStatus |
status()
Return the transaction status.
|
TxnMeta |
updateTxnStatus(TxnStatus newStatus,
TxnStatus expectedStatus)
Update the transaction stats from the newStatus only when
the current status is the expected expectedStatus.
|
org.apache.pulsar.client.api.transaction.TxnID id()
TxnStatus status()
List<String> producedPartitions()
List<TransactionSubscription> ackedPartitions()
TxnMeta addProducedPartitions(List<String> partitions) throws CoordinatorException.InvalidTxnStatusException
CoordinatorException.InvalidTxnStatusException - if the transaction is not in
TxnStatus.OPENTxnMeta addAckedPartitions(List<TransactionSubscription> subscriptions) throws CoordinatorException.InvalidTxnStatusException
subscriptions - the ackd subscriptions add to the transactionCoordinatorException.InvalidTxnStatusException - if the transaction is not in
TxnStatus.OPENTxnMeta updateTxnStatus(TxnStatus newStatus, TxnStatus expectedStatus) throws CoordinatorException.InvalidTxnStatusException
newStatus - the new transaction statusexpectedStatus - the expected transaction statusCoordinatorException.InvalidTxnStatusException - if the transaction is not in the expected
status, or it can not be transitioned to the new statuslong getOpenTimestamp()
long getTimeoutAt()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.