Enum Class ExecutionMode
- All Implemented Interfaces:
Serializable,Comparable<ExecutionMode>,Constable
This class define an enum for the execution mode of Eoulsan.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck that annotation of a class is compatible with the Eoulsan mode (local or Hadoop).Class<? extends Annotation>Get the Eoulsan annotation class that corresponds to the Eoulsan mode.static ExecutionModegetExecutionMode(Class<?> annotationClazz) Get the execution mode related to an annotation class.booleanTest if the execution mode is compatible with Hadoop mode.booleanTest if the excution mode is compatible with local mode.static ExecutionModeReturns the enum constant of this class with the specified name.static ExecutionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NONE
-
LOCAL_ONLY
-
HADOOP_COMPATIBLE
-
HADOOP_ONLY
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getAnnotationClass
Get the Eoulsan annotation class that corresponds to the Eoulsan mode.- Returns:
- an annotation class
-
isLocalCompatible
public boolean isLocalCompatible()Test if the excution mode is compatible with local mode.- Returns:
- true if the mode is compatible with local mode
-
isHadoopCompatible
public boolean isHadoopCompatible()Test if the execution mode is compatible with Hadoop mode.- Returns:
- true if the mode is compatible with Hadoop mode
-
accept
Check that annotation of a class is compatible with the Eoulsan mode (local or Hadoop).- Parameters:
clazz- class to testhadoopMode- Hadoop mode- Returns:
- true if the annotation of the class is compatible with the Eoulsan mode
-
getExecutionMode
Get the execution mode related to an annotation class.- Parameters:
annotationClazz- class to test- Returns:
- an EoulsanMode object
-