Package org.hyperledger.fabric.sdk
Class Channel.NOfEvents
- java.lang.Object
-
- org.hyperledger.fabric.sdk.Channel.NOfEvents
-
- Enclosing class:
- Channel
public static class Channel.NOfEvents extends java.lang.Object
NofEvents may be used with @seeChannel.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
Fields Modifier and Type Field Description static Channel.NOfEvents
nofNoEvents
Special NofEvents indicating that no transaction events are needed to complete the Future.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Channel.NOfEvents
addEventHubs(java.util.Collection<EventHub> eventHubs)
EventHubs that need to see the transaction event to complete.Channel.NOfEvents
addEventHubs(EventHub... eventHubs)
EventHubs that need to see the transaction event to complete.Channel.NOfEvents
addNOfs(java.util.Collection<Channel.NOfEvents> nofs)
NOfEvents that need to see the transaction event to complete.Channel.NOfEvents
addNOfs(Channel.NOfEvents... nOfEvents)
NOfEvents that need to see the transaction event to complete.Channel.NOfEvents
addPeers(java.util.Collection<Peer> peers)
Peers that need to see the transaction event to complete.Channel.NOfEvents
addPeers(Peer... peers)
Peers that need to see the transaction event to complete.static Channel.NOfEvents
createNoEvents()
static Channel.NOfEvents
createNofEvents()
Channel.NOfEvents
setN(int n)
-
-
-
Field Detail
-
nofNoEvents
public static Channel.NOfEvents 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 Detail
-
setN
public Channel.NOfEvents setN(int n)
-
addPeers
public Channel.NOfEvents addPeers(Peer... peers)
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
public Channel.NOfEvents addPeers(java.util.Collection<Peer> peers)
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.
-
addEventHubs
public Channel.NOfEvents addEventHubs(EventHub... eventHubs)
EventHubs that need to see the transaction event to complete.- Parameters:
eventHubs
- The peers that need to see the transaction event to complete.- Returns:
- This NofEvents.
-
addEventHubs
public Channel.NOfEvents addEventHubs(java.util.Collection<EventHub> eventHubs)
EventHubs that need to see the transaction event to complete.- Parameters:
eventHubs
- The peers that need to see the transaction event to complete.- Returns:
- This NofEvents.
-
addNOfs
public Channel.NOfEvents addNOfs(Channel.NOfEvents... nOfEvents)
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
public Channel.NOfEvents addNOfs(java.util.Collection<Channel.NOfEvents> nofs)
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
public static Channel.NOfEvents createNofEvents()
-
createNoEvents
public static Channel.NOfEvents createNoEvents()
-
-