Interface TransactionBufferClient


  • @Private
    @Evolving
    public interface 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.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<TxnID> abortTxnOnSubscription​(java.lang.String topic, java.lang.String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark)
      Abort the transaction associated with the topic subscription.
      java.util.concurrent.CompletableFuture<TxnID> abortTxnOnTopic​(java.lang.String topic, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark)
      Abort the transaction associated with the topic.
      void close()  
      java.util.concurrent.CompletableFuture<TxnID> commitTxnOnSubscription​(java.lang.String topic, java.lang.String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark)
      Commit the transaction associated with the topic subscription.
      java.util.concurrent.CompletableFuture<TxnID> commitTxnOnTopic​(java.lang.String topic, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark)
      Commit the transaction associated with the topic.
    • Method Detail

      • commitTxnOnTopic

        java.util.concurrent.CompletableFuture<TxnID> commitTxnOnTopic​(java.lang.String topic,
                                                                       long txnIdMostBits,
                                                                       long txnIdLeastBits,
                                                                       long lowWaterMark)
        Commit the transaction associated with the topic.
        Parameters:
        topic - topic name
        txnIdMostBits - the most bits of txn id
        txnIdLeastBits - the least bits of txn id
        lowWaterMark - the low water mark of this txn;
        Returns:
        the future represents the commit result
      • abortTxnOnTopic

        java.util.concurrent.CompletableFuture<TxnID> abortTxnOnTopic​(java.lang.String topic,
                                                                      long txnIdMostBits,
                                                                      long txnIdLeastBits,
                                                                      long lowWaterMark)
        Abort the transaction associated with the topic.
        Parameters:
        topic - topic name
        txnIdMostBits - the most bits of txn id
        txnIdLeastBits - the least bits of txn id
        lowWaterMark - the low water mark of this txn
        Returns:
        the future represents the abort result
      • commitTxnOnSubscription

        java.util.concurrent.CompletableFuture<TxnID> commitTxnOnSubscription​(java.lang.String topic,
                                                                              java.lang.String subscription,
                                                                              long txnIdMostBits,
                                                                              long txnIdLeastBits,
                                                                              long lowWaterMark)
        Commit the transaction associated with the topic subscription.
        Parameters:
        topic - topic name
        subscription - subscription name
        txnIdMostBits - the most bits of txn id
        txnIdLeastBits - the least bits of txn id
        lowWaterMark - the low water mark of this txn
        Returns:
        the future represents the commit result
      • abortTxnOnSubscription

        java.util.concurrent.CompletableFuture<TxnID> abortTxnOnSubscription​(java.lang.String topic,
                                                                             java.lang.String subscription,
                                                                             long txnIdMostBits,
                                                                             long txnIdLeastBits,
                                                                             long lowWaterMark)
        Abort the transaction associated with the topic subscription.
        Parameters:
        topic - topic name
        subscription - subscription name
        txnIdMostBits - the most bits of txn id
        txnIdLeastBits - the least bits of txn id
        lowWaterMark - the low water mark of this txn
        Returns:
        the future represents the abort result
      • close

        void close()