Package org.hyperledger.fabric.sdk
Class Channel.TransactionOptions
- java.lang.Object
 - 
- org.hyperledger.fabric.sdk.Channel.TransactionOptions
 
 
- 
- Enclosing class:
 - Channel
 
public static class Channel.TransactionOptions extends java.lang.ObjectTransactionOptions class can be used to change how the SDK processes the Transaction. 
- 
- 
Constructor Summary
Constructors Constructor Description TransactionOptions() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Channel.TransactionOptionscreateTransactionOptions()Create transaction options.Channel.TransactionOptionsfailFast(boolean failFast)Fail fast when there is an invalid transaction received on the eventhub or eventing peer being observed.Channel.TransactionOptionsnOfEvents(Channel.NOfEvents nOfEvents)Events reporting Eventing Peers and EventHubs to complete the transaction.Channel.TransactionOptionsorderers(java.util.Collection<Orderer> orderers)The orders to try on this transaction.Channel.TransactionOptionsorderers(Orderer... orderers)The orders to try on this transaction.Channel.TransactionOptionsshuffleOrders(boolean shuffleOrders)Shuffle the order the Orderers are tried.Channel.TransactionOptionsuserContext(User userContext)The user context that is to be used. 
 - 
 
- 
- 
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 @seeChannel.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
 
 
 - 
 
 -