Enum ExecutionEnvironmentField
- java.lang.Object
-
- java.lang.Enum<ExecutionEnvironmentField>
-
- oracle.pgx.api.executionenvironment.ExecutionEnvironmentField
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ExecutionEnvironmentField>
public enum ExecutionEnvironmentField extends java.lang.Enum<ExecutionEnvironmentField>
A wrapper for config fields that also provides value validation and type checking
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW_MULTIPLE_CONCURRENT_TASKSMAX_NUM_THREADSWrapper forField.MAX_THREADS, must be a positive integerNUM_THREADS_PER_TASKWrapper forNUM_IO_THREADS_PER_TASK, must be a positive integerPRIORITYWrapper forField.PRIORITY, no validatorsUPDATE_CONSISTENCY_MODELWrapper forPgxConfig.Field.DEFAULT_IN_PLACE_UPDATE_CONSISTENCY_MODEL, no validatorsWEIGHTWrapper forField.WEIGHT, must be a positive integer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckType(java.lang.Object o)Checks that a given type matches the type ofoConfigFieldgetField()<T extends ConfigField>
TgetField(java.lang.Class<T> expectedClass)gets theConfigField, ensuring it is of typeexpectedClassjava.lang.Class<?>getType()booleanisPoolBound()static ExecutionEnvironmentFieldvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ExecutionEnvironmentField[]values()Returns an array containing the constants of this enum type, in the order they are declared.voidverify(java.lang.Object value)checks that the type matches the one ofvalueand then checks the validity using the provided validators
-
-
-
Enum Constant Detail
-
NUM_THREADS_PER_TASK
public static final ExecutionEnvironmentField NUM_THREADS_PER_TASK
Wrapper forNUM_IO_THREADS_PER_TASK, must be a positive integer
-
WEIGHT
public static final ExecutionEnvironmentField WEIGHT
Wrapper forField.WEIGHT, must be a positive integer
-
PRIORITY
public static final ExecutionEnvironmentField PRIORITY
Wrapper forField.PRIORITY, no validators
-
MAX_NUM_THREADS
public static final ExecutionEnvironmentField MAX_NUM_THREADS
Wrapper forField.MAX_THREADS, must be a positive integer
-
UPDATE_CONSISTENCY_MODEL
public static final ExecutionEnvironmentField UPDATE_CONSISTENCY_MODEL
Wrapper forPgxConfig.Field.DEFAULT_IN_PLACE_UPDATE_CONSISTENCY_MODEL, no validators
-
ALLOW_MULTIPLE_CONCURRENT_TASKS
public static final ExecutionEnvironmentField ALLOW_MULTIPLE_CONCURRENT_TASKS
-
-
Method Detail
-
values
public static ExecutionEnvironmentField[] 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 (ExecutionEnvironmentField c : ExecutionEnvironmentField.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExecutionEnvironmentField 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 namejava.lang.NullPointerException- if the argument is null
-
isPoolBound
public boolean isPoolBound()
-
getField
public <T extends ConfigField> T getField(java.lang.Class<T> expectedClass)
gets theConfigField, ensuring it is of typeexpectedClass- Parameters:
expectedClass- the expected class of theConfigField- Returns:
fieldcast to the expected class- Throws:
java.lang.IllegalArgumentException- iffieldis not assignable toexpectedClass
-
getField
public ConfigField getField()
- Returns:
- the
ConfigField
-
checkType
public void checkType(java.lang.Object o)
Checks that a given type matches the type ofo- Parameters:
o- an object of the type that is checked against- Throws:
java.lang.IllegalArgumentException- iffieldis not assignable to the type ofo
-
verify
public void verify(java.lang.Object value)
checks that the type matches the one ofvalueand then checks the validity using the provided validators
-
getType
public java.lang.Class<?> getType()
- Returns:
- the type of the field
-
-