Enum ExecutionMode
- java.lang.Object
-
- java.lang.Enum<ExecutionMode>
-
- fr.ens.biologie.genomique.eoulsan.annotations.ExecutionMode
-
- All Implemented Interfaces:
Serializable
,Comparable<ExecutionMode>
public enum ExecutionMode extends Enum<ExecutionMode>
This class define an enum for the execution mode of Eoulsan.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HADOOP_COMPATIBLE
HADOOP_ONLY
LOCAL_ONLY
NONE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
accept(Class<?> clazz, boolean hadoopMode)
Check that annotation of a class is compatible with the Eoulsan mode (local or Hadoop).Class<? extends Annotation>
getAnnotationClass()
Get the Eoulsan annotation class that corresponds to the Eoulsan mode.static ExecutionMode
getExecutionMode(Class<?> annotationClazz)
Get the execution mode related to an annotation class.boolean
isHadoopCompatible()
Test if the execution mode is compatible with Hadoop mode.boolean
isLocalCompatible()
Test if the excution mode is compatible with local mode.static ExecutionMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static ExecutionMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ExecutionMode NONE
-
LOCAL_ONLY
public static final ExecutionMode LOCAL_ONLY
-
HADOOP_COMPATIBLE
public static final ExecutionMode HADOOP_COMPATIBLE
-
HADOOP_ONLY
public static final ExecutionMode HADOOP_ONLY
-
-
Method Detail
-
values
public static ExecutionMode[] 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 (ExecutionMode c : ExecutionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExecutionMode 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
-
getAnnotationClass
public Class<? extends Annotation> 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
public static boolean accept(Class<?> clazz, boolean hadoopMode)
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
public static ExecutionMode getExecutionMode(Class<?> annotationClazz)
Get the execution mode related to an annotation class.- Parameters:
annotationClazz
- class to test- Returns:
- an EoulsanMode object
-
-