Enum DefaultCommitHandlers

java.lang.Object
java.lang.Enum<DefaultCommitHandlers>
org.hyperledger.fabric.gateway.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").
  • Enum Constant Details

    • NONE

      public static final DefaultCommitHandlers NONE
      Do not wait for any commit events to be received from peers after submitting a transaction.
    • MSPID_SCOPE_ALLFORTX

      public static final DefaultCommitHandlers 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

      public static final DefaultCommitHandlers NETWORK_SCOPE_ALLFORTX
      Wait to receive commit events from all currently responding peers in the network after submitting a transaction.
    • PREFER_MSPID_SCOPE_ALLFORTX

      public static final DefaultCommitHandlers 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

      public static final DefaultCommitHandlers 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

      public static final DefaultCommitHandlers 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

      public static final DefaultCommitHandlers 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

      public static DefaultCommitHandlers[] 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

      public static DefaultCommitHandlers valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • create

      public CommitHandler create(String transactionId, Network network)
      Description copied from interface: CommitHandlerFactory
      Factory function to create a commit handler instance.
      Specified by:
      create in interface CommitHandlerFactory
      Parameters:
      transactionId - Transaction for which the instance is to handle commit events.
      network - Network on which the transaction is invoked.
      Returns:
      A commit handler.