Package org.hyperledger.fabric.sdk
Class Channel.NOfEvents
java.lang.Object
org.hyperledger.fabric.sdk.Channel.NOfEvents
- Enclosing class:
- Channel
NofEvents may be used with @see
Channel.TransactionOptions.nOfEvents(NOfEvents)
to control how reporting Peer service events and Eventhubs will
complete the future acknowledging the transaction has been seen by those Peers.
You can use the method @see nofNoEvents
to create an NOEvents that will result in the future being completed immediately
when the Orderer has accepted the transaction. Note in this case the transaction event will be set to null.
NofEvents can add Peer Eventing services and Eventhubs that should complete the future. By default all will need to
see the transactions to complete the future. The method @see setN(int)
can set how many in the group need to see the transaction
completion. Essentially setting it to 1 is any.
NofEvents may also contain other NofEvent grouping. They can be nested.
-
Field Summary
Modifier and TypeFieldDescriptionstatic Channel.NOfEvents
Special NofEvents indicating that no transaction events are needed to complete the Future. -
Method Summary
Modifier and TypeMethodDescriptionaddNOfs
(Collection<Channel.NOfEvents> nofs) NOfEvents that need to see the transaction event to complete.addNOfs
(Channel.NOfEvents... nOfEvents) NOfEvents that need to see the transaction event to complete.addPeers
(Collection<Peer> peers) Peers that need to see the transaction event to complete.Peers that need to see the transaction event to complete.static Channel.NOfEvents
static Channel.NOfEvents
setN
(int n)
-
Field Details
-
nofNoEvents
Special NofEvents indicating that no transaction events are needed to complete the Future. This will result in the Future being completed as soon has the Orderer has seen the transaction.
-
-
Method Details
-
setN
-
addPeers
Peers that need to see the transaction event to complete.- Parameters:
peers
- The peers that need to see the transaction event to complete.- Returns:
- This NofEvents.
-
addPeers
Peers that need to see the transaction event to complete.- Parameters:
peers
- The peers that need to see the transaction event to complete.- Returns:
- This NofEvents.
-
addNOfs
NOfEvents that need to see the transaction event to complete.- Parameters:
nOfEvents
- The nested event group that need to set the transacton event to complete.- Returns:
- This NofEvents.
-
addNOfs
NOfEvents that need to see the transaction event to complete.- Parameters:
nofs
- The nested event group that need to set the transacton event to complete.- Returns:
- This NofEvents.
-
createNofEvents
-
createNoEvents
-