Enum Class DataSourceSelectorEnum

java.lang.Object
java.lang.Enum<DataSourceSelectorEnum>
com.alibaba.druid.pool.ha.selector.DataSourceSelectorEnum
All Implemented Interfaces:
Serializable, Comparable<DataSourceSelectorEnum>, java.lang.constant.Constable

public enum DataSourceSelectorEnum extends Enum<DataSourceSelectorEnum>
An enum holding the names and classes of DataSourceSelector.
Author:
DigitalSonic
  • Enum Constant Details

  • Method Details

    • values

      public static DataSourceSelectorEnum[] 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

      public static DataSourceSelectorEnum valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • newInstance

      public DataSourceSelector newInstance(HighAvailableDataSource dataSource)
      Create a new instance of the DataSourceSelector represented by this enum.
      Returns:
      null if dataSource is not given or exception occurred while creating new instance
    • getName

      public String getName()
    • getClazz

      public Class<? extends DataSourceSelector> getClazz()