public enum DataSourceSelectorEnum extends Enum<DataSourceSelectorEnum>
| Enum Constant and Description |
|---|
BY_NAME |
RANDOM |
STICKY_RANDOM |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends DataSourceSelector> |
getClazz() |
String |
getName() |
DataSourceSelector |
newInstance(HighAvailableDataSource dataSource)
Create a new instance of the DataSourceSelector represented by this enum.
|
static DataSourceSelectorEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DataSourceSelectorEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataSourceSelectorEnum BY_NAME
public static final DataSourceSelectorEnum RANDOM
public static final DataSourceSelectorEnum STICKY_RANDOM
public static DataSourceSelectorEnum[] values()
for (DataSourceSelectorEnum c : DataSourceSelectorEnum.values()) System.out.println(c);
public static DataSourceSelectorEnum valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic DataSourceSelector newInstance(HighAvailableDataSource dataSource)
public String getName()
public Class<? extends DataSourceSelector> getClazz()
Copyright © 2013–2019 Alibaba Group. All rights reserved.