Enum QueryInfo.RetryBehaviour
- java.lang.Object
-
- java.lang.Enum<QueryInfo.RetryBehaviour>
-
- com.opencloud.slee.resources.dbquery.QueryInfo.RetryBehaviour
-
- All Implemented Interfaces:
Serializable
,Comparable<QueryInfo.RetryBehaviour>
- Enclosing interface:
- QueryInfo
public static enum QueryInfo.RetryBehaviour extends Enum<QueryInfo.RetryBehaviour>
Retry behaviour options in the case of multiple data sources.- Since:
- 1.2
-
-
Enum Constant Summary
Enum Constants Enum Constant Description TRY_ALL
All configured data sources will be tried, whether the previous one failed or was marked as unavailable.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.TRY_FIRST_ONLY
Only the first data source will ever be tried.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QueryInfo.RetryBehaviour
valueOf(String name)
Returns the enum constant of this type with the specified name.static QueryInfo.RetryBehaviour[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- if the argument is null
-
-