接口 TransactionBuilder


  • @Public
    @Evolving
    public interface TransactionBuilder
    The builder to build a transaction for Pulsar.
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      java.util.concurrent.CompletableFuture<Transaction> build()
      Build the transaction with the configured settings.
      TransactionBuilder withTransactionTimeout​(long timeout, java.util.concurrent.TimeUnit timeoutUnit)
      Configure the maximum amount of time that the transaction coordinator will for a transaction to be completed by the client before proactively aborting the ongoing transaction.
    • 方法详细资料

      • withTransactionTimeout

        TransactionBuilder withTransactionTimeout​(long timeout,
                                                  java.util.concurrent.TimeUnit timeoutUnit)
        Configure the maximum amount of time that the transaction coordinator will for a transaction to be completed by the client before proactively aborting the ongoing transaction.

        The config value will be sent to the transaction coordinator along with the CommandNewTxn. Default is 60 seconds.

        参数:
        timeout - the transaction timeout value
        timeoutUnit - the transaction timeout unit
        返回:
        the transaction builder itself
      • build

        java.util.concurrent.CompletableFuture<Transaction> build()
        Build the transaction with the configured settings.
        返回:
        a future represents the result of starting a new transaction