Class Channel.TransactionOptions

java.lang.Object
org.hyperledger.fabric.sdk.Channel.TransactionOptions
Enclosing class:
Channel

public static class Channel.TransactionOptions extends Object
TransactionOptions class can be used to change how the SDK processes the Transaction.
  • Constructor Details

    • TransactionOptions

      public TransactionOptions()
  • Method Details

    • failFast

      public Channel.TransactionOptions failFast(boolean failFast)
      Fail fast when there is an invalid transaction received on the eventing peer being observed. The default value is true.
      Parameters:
      failFast - fail fast.
      Returns:
      This TransactionOptions
    • userContext

      public Channel.TransactionOptions userContext(User userContext)
      The user context that is to be used. The default is the user context on the client.
      Parameters:
      userContext -
      Returns:
      This TransactionOptions
    • orderers

      public Channel.TransactionOptions orderers(Orderer... orderers)
      The orders to try on this transaction. Each order is tried in turn for a successful submission. The default is try all orderers on the chain.
      Parameters:
      orderers - the orderers to try.
      Returns:
      This TransactionOptions
    • shuffleOrders

      public Channel.TransactionOptions shuffleOrders(boolean shuffleOrders)
      Shuffle the order the Orderers are tried. The default is true.
      Parameters:
      shuffleOrders -
      Returns:
      This TransactionOptions
    • nOfEvents

      public Channel.TransactionOptions nOfEvents(Channel.NOfEvents nOfEvents)
      Events reporting Eventing Peers to complete the transaction. This maybe set to NOfEvents.nofNoEvents that will complete the future as soon as a successful submission to an Orderer, but the completed Transaction event in that case will be null.
      Parameters:
      nOfEvents - More details: @see Channel.NOfEvents
      Returns:
      This TransactionOptions
    • createTransactionOptions

      public static Channel.TransactionOptions createTransactionOptions()
      Create transaction options.
      Returns:
      return transaction options.
    • orderers

      public Channel.TransactionOptions orderers(Collection<Orderer> orderers)
      The orders to try on this transaction. Each order is tried in turn for a successful submission. The default is try all orderers on the chain.
      Parameters:
      orderers - the orderers to try.
      Returns:
      This TransactionOptions