Enum QueryInfo.RetryBehaviour

    • Enum Constant Detail

      • TRY_ALL

        public static final QueryInfo.RetryBehaviour TRY_ALL
        All configured data sources will be tried, whether the previous one failed or was marked as unavailable.

        Typical scenario: read-only requests where every attempt should be made to read the data.

      • TRY_FIRST_AVAILABLE

        public static final QueryInfo.RetryBehaviour TRY_FIRST_AVAILABLE
        The first available data source will be tried, but if it fails the request will not be retried on subsequent data sources.

        Typical scenario: updates to a database that can receive replicated data from a backup during recovery so the update can be safely attempted on either the primary or the secondary data source but not both.

      • TRY_FIRST_ONLY

        public static final QueryInfo.RetryBehaviour TRY_FIRST_ONLY
        Only the first data source will ever be tried. If it is unavailable the request will not be sent.

        Typical scenario: updates to a master database with a read-only backup database, which cannot replicate data back to the master database.

    • Method Detail

      • values

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

        public static QueryInfo.RetryBehaviour 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