All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.hajdbc.state.health.observer.DetectMode Maven / Gradle / Ivy

There is a newer version: 3.6.61
Show newest version
package net.sf.hajdbc.state.health.observer;

/**
 * 检测模式
 */
public enum DetectMode {
  /**
   * 禁用
   */
  disabled,
  /**
   * 需要全部满足
   */
  all,
  /**
   * 需要过半满足
   */
  half;

  public static DetectMode of(String name){
    DetectMode mode = DetectMode.disabled;
    if("".equals(name)){
      mode = DetectMode.all;
    }else {
      for (DetectMode detectMode : DetectMode.values()) {
        if (detectMode.name().equalsIgnoreCase(name)) {
          mode = detectMode;
          break;
        }
      }
    }
    return mode;

  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy