枚举 ConsulParameter
- java.lang.Object
-
- java.lang.Enum<ConsulParameter>
-
- org.apache.dubbo.registry.consul.ConsulParameter
-
- 所有已实现的接口:
Serializable,Comparable<ConsulParameter>
public enum ConsulParameter extends Enum<ConsulParameter>
The enumeration for the Consul's parameters on theURL- 从以下版本开始:
- 2.7.8
- 另请参阅:
URL.getParameters()
-
-
枚举常量概要
枚举常量 枚举常量 说明 ACL_TOKENCONSISTENCY_MODEDEFAULT_ZONE_METADATA_NAMEINSTANCE_GROUPINSTANCE_ZONETAGS
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetValue(URL registryURL)The parameter value from the specified registryURL<T> TgetValue(URL registryURL, Class<T> valueType, T defaultValue)The parameter value from the specified registryURLstatic ConsulParametervalueOf(String name)返回带有指定名称的该类型的枚举常量。static ConsulParameter[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
ACL_TOKEN
public static final ConsulParameter ACL_TOKEN
-
TAGS
public static final ConsulParameter TAGS
-
INSTANCE_ZONE
public static final ConsulParameter INSTANCE_ZONE
-
DEFAULT_ZONE_METADATA_NAME
public static final ConsulParameter DEFAULT_ZONE_METADATA_NAME
-
INSTANCE_GROUP
public static final ConsulParameter INSTANCE_GROUP
-
CONSISTENCY_MODE
public static final ConsulParameter CONSISTENCY_MODE
-
-
方法详细资料
-
values
public static ConsulParameter[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (ConsulParameter c : ConsulParameter.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static ConsulParameter valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
getValue
public String getValue(URL registryURL)
The parameter value from the specified registryURL- 参数:
registryURL- the specified registryURL- 返回:
defaultValueif not found
-
getValue
public <T> T getValue(URL registryURL, Class<T> valueType, T defaultValue)
The parameter value from the specified registryURL- 参数:
registryURL- the specified registryURLvalueType- the type of parameter valuedefaultValue- the default value if parameter is absent- 返回:
defaultValueif not found
-
-