Interface TransactionBufferHandler
public interface TransactionBufferHandler
Interface of transaction buffer handler.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Release resources.endTxnOnSubscription
(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, TxnAction action, long lowWaterMark) End transaction on subscription.endTxnOnTopic
(String topic, long txnIdMostBits, long txnIdLeastBits, TxnAction action, long lowWaterMark) End transaction on topic.int
int
void
handleEndTxnOnSubscriptionResponse
(long requestId, CommandEndTxnOnSubscriptionResponse response) Handle response of tend transaction on subscription.void
handleEndTxnOnTopicResponse
(long requestId, CommandEndTxnOnPartitionResponse response) Handle response of end transaction on topic.
-
Method Details
-
endTxnOnTopic
CompletableFuture<TxnID> endTxnOnTopic(String topic, long txnIdMostBits, long txnIdLeastBits, TxnAction action, long lowWaterMark) End transaction on topic.- Parameters:
topic
- topic nametxnIdMostBits
- txnIdMostBitstxnIdLeastBits
- txnIdLeastBitsaction
- transaction action typelowWaterMark
- low water mark of this transaction- Returns:
- TxnId
-
endTxnOnSubscription
CompletableFuture<TxnID> endTxnOnSubscription(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, TxnAction action, long lowWaterMark) End transaction on subscription.- Parameters:
topic
- topic namesubscription
- subscription nametxnIdMostBits
- txnIdMostBitstxnIdLeastBits
- txnIdLeastBitslowWaterMark
- low water mark of this transactionaction
- transaction action type- Returns:
- TxnId
-
handleEndTxnOnTopicResponse
Handle response of end transaction on topic.- Parameters:
requestId
- request IDresponse
- response
-
handleEndTxnOnSubscriptionResponse
void handleEndTxnOnSubscriptionResponse(long requestId, CommandEndTxnOnSubscriptionResponse response) Handle response of tend transaction on subscription.- Parameters:
requestId
- request IDresponse
- response
-
close
void close()Release resources. -
getAvailableRequestCredits
int getAvailableRequestCredits() -
getPendingRequestsCount
int getPendingRequestsCount()
-