public static class Channel.NOfEvents extends Object
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.
Modifier and Type | Field and Description |
---|---|
static Channel.NOfEvents |
nofNoEvents
Special NofEvents indicating that no transaction events are needed to complete the Future.
|
Modifier and Type | Method and Description |
---|---|
Channel.NOfEvents |
addNOfs(Channel.NOfEvents... nOfEvents)
NOfEvents that need to see the transaction event to complete.
|
Channel.NOfEvents |
addNOfs(Collection<Channel.NOfEvents> nofs)
NOfEvents that need to see the transaction event to complete.
|
Channel.NOfEvents |
addPeers(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) |
public static Channel.NOfEvents nofNoEvents
public Channel.NOfEvents setN(int n)
public Channel.NOfEvents addPeers(Peer... peers)
peers
- The peers that need to see the transaction event to complete.public Channel.NOfEvents addPeers(Collection<Peer> peers)
peers
- The peers that need to see the transaction event to complete.public Channel.NOfEvents addNOfs(Channel.NOfEvents... nOfEvents)
nOfEvents
- The nested event group that need to set the transacton event to complete.public Channel.NOfEvents addNOfs(Collection<Channel.NOfEvents> nofs)
nofs
- The nested event group that need to set the transacton event to complete.public static Channel.NOfEvents createNofEvents()
public static Channel.NOfEvents createNoEvents()
Copyright © 2022. All rights reserved.