接口 TransactionBufferClient
The transaction buffer client to commit and abort transactions on topics or subscription.
The transaction buffer client is used by transaction coordinator to end transactions.
-
方法概要
修饰符和类型方法说明abortTxnOnSubscription(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Abort the transaction associated with the topic subscription.abortTxnOnTopic(String topic, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Abort the transaction associated with the topic.voidclose()commitTxnOnSubscription(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Commit the transaction associated with the topic subscription.commitTxnOnTopic(String topic, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Commit the transaction associated with the topic.intint
-
方法详细资料
-
commitTxnOnTopic
CompletableFuture<TxnID> commitTxnOnTopic(String topic, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Commit the transaction associated with the topic.- 参数:
topic- topic nametxnIdMostBits- the most bits of txn idtxnIdLeastBits- the least bits of txn idlowWaterMark- the low water mark of this txn;- 返回:
- the future represents the commit result
-
abortTxnOnTopic
CompletableFuture<TxnID> abortTxnOnTopic(String topic, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Abort the transaction associated with the topic.- 参数:
topic- topic nametxnIdMostBits- the most bits of txn idtxnIdLeastBits- the least bits of txn idlowWaterMark- the low water mark of this txn- 返回:
- the future represents the abort result
-
commitTxnOnSubscription
CompletableFuture<TxnID> commitTxnOnSubscription(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Commit the transaction associated with the topic subscription.- 参数:
topic- topic namesubscription- subscription nametxnIdMostBits- the most bits of txn idtxnIdLeastBits- the least bits of txn idlowWaterMark- the low water mark of this txn- 返回:
- the future represents the commit result
-
abortTxnOnSubscription
CompletableFuture<TxnID> abortTxnOnSubscription(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark) Abort the transaction associated with the topic subscription.- 参数:
topic- topic namesubscription- subscription nametxnIdMostBits- the most bits of txn idtxnIdLeastBits- the least bits of txn idlowWaterMark- the low water mark of this txn- 返回:
- the future represents the abort result
-
close
void close() -
getAvailableRequestCredits
int getAvailableRequestCredits() -
getPendingRequestsCount
int getPendingRequestsCount()
-