类 SearchableProperties
- java.lang.Object
-
- com.alibaba.nacos.client.env.SearchableProperties
-
- 所有已实现的接口:
NacosClientProperties
class SearchableProperties extends java.lang.Object implements NacosClientProperties
Searchable NacosClientProperties. the SearchableProperties that it can be specified search order by nacos.env.first- 作者:
- onewe
-
-
字段概要
字段 修饰符和类型 字段 说明 private static CompositeConverterCONVERTERprivate static java.util.List<SourceType>DEFAULT_ORDERprivate static DefaultSettingPropertySourceDEFAULT_SETTING_PROPERTY_SOURCE(专用程序包) static SearchablePropertiesINSTANCEprivate static JvmArgsPropertySourceJVM_ARGS_PROPERTY_SOURCEprivate static org.slf4j.LoggerLOGGERprivate PropertiesPropertySourcepropertiesPropertySourceprivate java.util.List<AbstractPropertySource>propertySourcesprivate static SystemEnvPropertySourceSYSTEM_ENV_PROPERTY_SOURCE-
从接口继承的字段 com.alibaba.nacos.client.env.NacosClientProperties
PROTOTYPE
-
-
构造器概要
构造器 限定符 构造器 说明 privateSearchableProperties()privateSearchableProperties(PropertiesPropertySource propertiesPropertySource)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddProperties(java.util.Properties properties)add properties.java.util.PropertiesasProperties()get properties from NacosClientProperties.private java.util.List<AbstractPropertySource>build(AbstractPropertySource... propertySources)booleancontainsKey(java.lang.String key)Tests if the specified object is a key in this NacosClientProperties.NacosClientPropertiesderive()create a new NacosClientProperties which scope is itself.NacosClientPropertiesderive(java.util.Properties properties)create a new NacosClientProperties from NacosClientProperties#PROTOTYPE and init.java.lang.BooleangetBoolean(java.lang.String key)get boolean, if the value can not be got by the special key, the null will be returned.java.lang.BooleangetBoolean(java.lang.String key, java.lang.Boolean defaultValue)get boolean, if the value can not be got by the special key, the default value will be returned.java.lang.IntegergetInteger(java.lang.String key)get integer, if the value can not be got by the special key, the null will be returned.java.lang.IntegergetInteger(java.lang.String key, java.lang.Integer defaultValue)get integer, if the value can not be got by the special key, the default value will be returned.java.lang.LonggetLong(java.lang.String key)get long, if the value can not be got by the special key, the null will be returned.java.lang.LonggetLong(java.lang.String key, java.lang.Long defaultValue)get long, if the value can not be got by the special key, the default value will be returned.java.lang.StringgetProperty(java.lang.String key)get property, if the value can not be got by the special key, the null will be returned.java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)get property, if the value can not be got by the special key, the default value will be returned.private <T> java.util.Optional<T>search(java.lang.String key, java.lang.Class<T> targetType)voidsetProperty(java.lang.String key, java.lang.String value)set property.private java.util.List<AbstractPropertySource>sortPropertySource(SourceType firstType, AbstractPropertySource... propertySources)private java.util.List<AbstractPropertySource>sortPropertySourceDefaultOrder(AbstractPropertySource... propertySources)
-
-
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
JVM_ARGS_PROPERTY_SOURCE
private static final JvmArgsPropertySource JVM_ARGS_PROPERTY_SOURCE
-
SYSTEM_ENV_PROPERTY_SOURCE
private static final SystemEnvPropertySource SYSTEM_ENV_PROPERTY_SOURCE
-
DEFAULT_SETTING_PROPERTY_SOURCE
private static final DefaultSettingPropertySource DEFAULT_SETTING_PROPERTY_SOURCE
-
DEFAULT_ORDER
private static final java.util.List<SourceType> DEFAULT_ORDER
-
CONVERTER
private static final CompositeConverter CONVERTER
-
INSTANCE
static final SearchableProperties INSTANCE
-
propertySources
private final java.util.List<AbstractPropertySource> propertySources
-
propertiesPropertySource
private final PropertiesPropertySource propertiesPropertySource
-
-
构造器详细资料
-
SearchableProperties
private SearchableProperties()
-
SearchableProperties
private SearchableProperties(PropertiesPropertySource propertiesPropertySource)
-
-
方法详细资料
-
getProperty
public java.lang.String getProperty(java.lang.String key)
从接口复制的说明:NacosClientPropertiesget property, if the value can not be got by the special key, the null will be returned.- 指定者:
getProperty在接口中NacosClientProperties- 参数:
key- special key- 返回:
- string value or null.
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)从接口复制的说明:NacosClientPropertiesget property, if the value can not be got by the special key, the default value will be returned.- 指定者:
getProperty在接口中NacosClientProperties- 参数:
key- special keydefaultValue- default value- 返回:
- string value or default value.
-
getBoolean
public java.lang.Boolean getBoolean(java.lang.String key)
从接口复制的说明:NacosClientPropertiesget boolean, if the value can not be got by the special key, the null will be returned.- 指定者:
getBoolean在接口中NacosClientProperties- 参数:
key- special key- 返回:
- boolean value or null.
-
getBoolean
public java.lang.Boolean getBoolean(java.lang.String key, java.lang.Boolean defaultValue)从接口复制的说明:NacosClientPropertiesget boolean, if the value can not be got by the special key, the default value will be returned.- 指定者:
getBoolean在接口中NacosClientProperties- 参数:
key- special keydefaultValue- default value- 返回:
- boolean value or defaultValue.
-
getInteger
public java.lang.Integer getInteger(java.lang.String key)
从接口复制的说明:NacosClientPropertiesget integer, if the value can not be got by the special key, the null will be returned.- 指定者:
getInteger在接口中NacosClientProperties- 参数:
key- special key- 返回:
- integer value or null
-
getInteger
public java.lang.Integer getInteger(java.lang.String key, java.lang.Integer defaultValue)从接口复制的说明:NacosClientPropertiesget integer, if the value can not be got by the special key, the default value will be returned.- 指定者:
getInteger在接口中NacosClientProperties- 参数:
key- special keydefaultValue- default value- 返回:
- integer value or default value
-
getLong
public java.lang.Long getLong(java.lang.String key)
从接口复制的说明:NacosClientPropertiesget long, if the value can not be got by the special key, the null will be returned.- 指定者:
getLong在接口中NacosClientProperties- 参数:
key- special key- 返回:
- long value or null
-
getLong
public java.lang.Long getLong(java.lang.String key, java.lang.Long defaultValue)从接口复制的说明:NacosClientPropertiesget long, if the value can not be got by the special key, the default value will be returned.- 指定者:
getLong在接口中NacosClientProperties- 参数:
key- special keydefaultValue- default value- 返回:
- long value or default value
-
setProperty
public void setProperty(java.lang.String key, java.lang.String value)从接口复制的说明:NacosClientPropertiesset property.- 指定者:
setProperty在接口中NacosClientProperties- 参数:
key- keyvalue- value
-
addProperties
public void addProperties(java.util.Properties properties)
从接口复制的说明:NacosClientPropertiesadd properties.- 指定者:
addProperties在接口中NacosClientProperties- 参数:
properties- properties
-
asProperties
public java.util.Properties asProperties()
从接口复制的说明:NacosClientPropertiesget properties from NacosClientProperties.- 指定者:
asProperties在接口中NacosClientProperties- 返回:
- properties
-
containsKey
public boolean containsKey(java.lang.String key)
从接口复制的说明:NacosClientPropertiesTests if the specified object is a key in this NacosClientProperties.- 指定者:
containsKey在接口中NacosClientProperties- 参数:
key- key – possible key- 返回:
- true if and only if the specified object is a key in this NacosClientProperties, false otherwise.
-
search
private <T> java.util.Optional<T> search(java.lang.String key, java.lang.Class<T> targetType)
-
build
private java.util.List<AbstractPropertySource> build(AbstractPropertySource... propertySources)
-
sortPropertySourceDefaultOrder
private java.util.List<AbstractPropertySource> sortPropertySourceDefaultOrder(AbstractPropertySource... propertySources)
-
sortPropertySource
private java.util.List<AbstractPropertySource> sortPropertySource(SourceType firstType, AbstractPropertySource... propertySources)
-
derive
public NacosClientProperties derive()
从接口复制的说明:NacosClientPropertiescreate a new NacosClientProperties which scope is itself.- 指定者:
derive在接口中NacosClientProperties- 返回:
- NacosClientProperties
-
derive
public NacosClientProperties derive(java.util.Properties properties)
从接口复制的说明:NacosClientPropertiescreate a new NacosClientProperties from NacosClientProperties#PROTOTYPE and init.- 指定者:
derive在接口中NacosClientProperties- 参数:
properties- properties- 返回:
- NacosClientProperties
-
-