Package org.hyperledger.fabric.gateway
Enum DefaultCommitHandlers
- All Implemented Interfaces:
Serializable
,Comparable<DefaultCommitHandlers>
,java.lang.constant.Constable
,CommitHandlerFactory
public enum DefaultCommitHandlers
extends Enum<DefaultCommitHandlers>
implements CommitHandlerFactory
Default commit handler implementations. Instances can be referenced directly or looked up by name, for example
DefaultCommitHandlers.valueOf("NONE")
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionWait to receive commit events from all currently responding peers in the user's organization after submitting a transaction.Wait to receive a commit event from any currently responding peer in the user's organization after submitting a transaction.Wait to receive commit events from all currently responding peers in the network after submitting a transaction.Wait to receive a commit event from any currently responding peer in the network after submitting a transaction.Do not wait for any commit events to be received from peers after submitting a transaction.Wait to receive commit events from all currently responding peers in the user's organization after submitting a transaction.Wait to receive a commit event from any currently responding peer in the user's organization after submitting a transaction. -
Method Summary
Modifier and TypeMethodDescriptionFactory function to create a commit handler instance.static DefaultCommitHandlers
Returns the enum constant of this type with the specified name.static DefaultCommitHandlers[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NONE
Do not wait for any commit events to be received from peers after submitting a transaction. -
MSPID_SCOPE_ALLFORTX
Wait to receive commit events from all currently responding peers in the user's organization after submitting a transaction. -
NETWORK_SCOPE_ALLFORTX
Wait to receive commit events from all currently responding peers in the network after submitting a transaction. -
PREFER_MSPID_SCOPE_ALLFORTX
Wait to receive commit events from all currently responding peers in the user's organization after submitting a transaction. If the user's organization has no peers, then wait to receive commit events from all currently responding peers in the network instead. -
MSPID_SCOPE_ANYFORTX
Wait to receive a commit event from any currently responding peer in the user's organization after submitting a transaction. -
NETWORK_SCOPE_ANYFORTX
Wait to receive a commit event from any currently responding peer in the network after submitting a transaction. -
PREFER_MSPID_SCOPE_ANYFORTX
Wait to receive a commit event from any currently responding peer in the user's organization after submitting a transaction. If the user's organization has no peers, then wait to receive a commit event from any currently responding peer in the network.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
create
Description copied from interface:CommitHandlerFactory
Factory function to create a commit handler instance.- Specified by:
create
in interfaceCommitHandlerFactory
- Parameters:
transactionId
- Transaction for which the instance is to handle commit events.network
- Network on which the transaction is invoked.- Returns:
- A commit handler.
-