Enum DefaultQueryHandlers

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DefaultQueryHandlers>, QueryHandlerFactory

    public enum DefaultQueryHandlers
    extends java.lang.Enum<DefaultQueryHandlers>
    implements QueryHandlerFactory
    Default query handler implementations. Instances can be referenced directly or looked up by name, for example DefaultQueryHandlers.valueOf("MSPID_SCOPE_ROUND_ROBIN").
    • Enum Constant Detail

      • MSPID_SCOPE_SINGLE

        public static final DefaultQueryHandlers MSPID_SCOPE_SINGLE
        The last peer that provided a successful response is used. If a peer fails then all other peers will be tried in turn until one provides a successful response. If no peers respond then an exception is thrown.
      • MSPID_SCOPE_ROUND_ROBIN

        public static final DefaultQueryHandlers MSPID_SCOPE_ROUND_ROBIN
        For each subsequent query, the next peer in the list is used. If a peer fails then all other peers will be tried in turn until one provides a successful response. If no peers respond then an exception is thrown.
      • PREFER_MSPID_SCOPE_SINGLE

        public static final DefaultQueryHandlers PREFER_MSPID_SCOPE_SINGLE
        The last peer that provided a successful response is used. If a peer fails then all other peers will be tried in turn until one provides a successful response. If no peers respond then an exception is thrown. If the user's organization has no peers, then all peers in the network will be used.
      • PREFER_MSPID_SCOPE_ROUND_ROBIN

        public static final DefaultQueryHandlers PREFER_MSPID_SCOPE_ROUND_ROBIN
        For each subsequent query, the next peer in the list is used. If a peer fails then all other peers will be tried in turn until one provides a successful response. If no peers respond then an exception is thrown. If the user's organization has no peers, then all peers in the network will be used.
    • Method Detail

      • values

        public static DefaultQueryHandlers[] 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 (DefaultQueryHandlers c : DefaultQueryHandlers.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DefaultQueryHandlers 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