Enum DefaultCommitHandlers

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      MSPID_SCOPE_ALLFORTX
      Wait to receive commit events from all currently responding peers in the user's organization after submitting a transaction.
      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_ALLFORTX
      Wait to receive commit events from all currently responding peers in the network 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.
      NONE
      Do not wait for any commit events to be received from peers 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.
      PREFER_MSPID_SCOPE_ANYFORTX
      Wait to receive a commit event from any currently responding peer in the user's organization after submitting a transaction.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CommitHandler create​(java.lang.String transactionId, Network network)
      Factory function to create a commit handler instance.
      static DefaultCommitHandlers valueOf​(java.lang.String name)
      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, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static DefaultCommitHandlers[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DefaultCommitHandlers c : DefaultCommitHandlers.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DefaultCommitHandlers valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • create

        public CommitHandler create​(java.lang.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.