Class Channel.TransactionOptions

  • Enclosing class:
    Channel


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

      • TransactionOptions

        public TransactionOptions​()
    • Method Detail

      • failFast

        public Channel.TransactionOptions failFast​(boolean failFast)
        Fail fast when there is an invalid transaction received on the eventhub or 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 and EventHubs 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 - See @see Channel.NOfEvents
        Returns:
        This TransactionOptions
      • createTransactionOptions

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

        public Channel.TransactionOptions orderers​(java.util.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