Package io.trino.execution
Enum FailureInjector.InjectedErrorCode
- java.lang.Object
-
- java.lang.Enum<FailureInjector.InjectedErrorCode>
-
- io.trino.execution.FailureInjector.InjectedErrorCode
-
- All Implemented Interfaces:
ErrorCodeSupplier,Serializable,Comparable<FailureInjector.InjectedErrorCode>
- Enclosing class:
- FailureInjector
public static enum FailureInjector.InjectedErrorCode extends Enum<FailureInjector.InjectedErrorCode> implements ErrorCodeSupplier
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INJECTED_EXTERNAL_ERRORINJECTED_INSUFFICIENT_RESOURCES_ERRORINJECTED_INTERNAL_ERRORINJECTED_USER_ERROR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FailureInjector.InjectedErrorCodegetErrorCode(ErrorType errorType)ErrorCodetoErrorCode()static FailureInjector.InjectedErrorCodevalueOf(String name)Returns the enum constant of this type with the specified name.static FailureInjector.InjectedErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INJECTED_USER_ERROR
public static final FailureInjector.InjectedErrorCode INJECTED_USER_ERROR
-
INJECTED_INTERNAL_ERROR
public static final FailureInjector.InjectedErrorCode INJECTED_INTERNAL_ERROR
-
INJECTED_INSUFFICIENT_RESOURCES_ERROR
public static final FailureInjector.InjectedErrorCode INJECTED_INSUFFICIENT_RESOURCES_ERROR
-
INJECTED_EXTERNAL_ERROR
public static final FailureInjector.InjectedErrorCode INJECTED_EXTERNAL_ERROR
-
-
Method Detail
-
values
public static FailureInjector.InjectedErrorCode[] 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 (FailureInjector.InjectedErrorCode c : FailureInjector.InjectedErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FailureInjector.InjectedErrorCode 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
-
toErrorCode
public ErrorCode toErrorCode()
- Specified by:
toErrorCodein interfaceErrorCodeSupplier
-
getErrorCode
public static FailureInjector.InjectedErrorCode getErrorCode(ErrorType errorType)
-
-