com.datastax.insight.core.dag.RunMode Maven / Gradle / Ivy
package com.datastax.insight.core.dag;
import javax.annotation.Nonnull;
/**
* 运行模式
*/
public enum RunMode {
RUN("run", "运行"),
RUN_SAMPLE("run_sample", "小数据量试运行"),
RUN_TO("run_to", "小数据量执行到此处"),
RUN_FROM("run_from", "小数据量从此处开始执行"),
RUN_ON("run_on", "小数据量执行该节点"),
RUN_EXPLORATION("run_exploration", "数据探索");
private String name;
private String desc;
RunMode(@Nonnull String name, String desc) {
this.name = name;
this.desc = desc;
}
public static RunMode getRunMode(String name) {
for (RunMode mode : RunMode.values()) {
if (mode.name.equals(name)) return mode;
}
return null;
}
public String getName() {return name;}
}