public interface NacosClientProperties
| 限定符和类型 | 字段和说明 |
|---|---|
static NacosClientProperties |
PROTOTYPE
all the NacosClientProperties object must be created by PROTOTYPE,
so child NacosClientProperties can read properties from the PROTOTYPE.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addProperties(Properties properties)
add properties.
|
Properties |
asProperties()
get properties from NacosClientProperties.
|
boolean |
containsKey(String key)
Tests if the specified object is a key in this NacosClientProperties.
|
NacosClientProperties |
derive()
create a new NacosClientProperties which scope is itself.
|
NacosClientProperties |
derive(Properties properties)
create a new NacosClientProperties from NacosClientProperties#PROTOTYPE and init.
|
Boolean |
getBoolean(String key)
get boolean, if the value can not be got by the special key, the null will be returned.
|
Boolean |
getBoolean(String key,
Boolean defaultValue)
get boolean, if the value can not be got by the special key, the default value will be returned.
|
Integer |
getInteger(String key)
get integer, if the value can not be got by the special key, the null will be returned.
|
Integer |
getInteger(String key,
Integer defaultValue)
get integer, if the value can not be got by the special key, the default value will be returned.
|
Long |
getLong(String key)
get long, if the value can not be got by the special key, the null will be returned.
|
Long |
getLong(String key,
Long defaultValue)
get long, if the value can not be got by the special key, the default value will be returned.
|
String |
getProperty(String key)
get property, if the value can not be got by the special key, the null will be returned.
|
String |
getProperty(String key,
String defaultValue)
get property, if the value can not be got by the special key, the default value will be returned.
|
void |
setProperty(String key,
String value)
set property.
|
static final NacosClientProperties PROTOTYPE
String getProperty(String key)
key - special keyString getProperty(String key, String defaultValue)
key - special keydefaultValue - default valueBoolean getBoolean(String key)
key - special keyBoolean getBoolean(String key, Boolean defaultValue)
key - special keydefaultValue - default valueInteger getInteger(String key)
key - special keyInteger getInteger(String key, Integer defaultValue)
key - special keydefaultValue - default valueLong getLong(String key)
key - special keyLong getLong(String key, Long defaultValue)
key - special keydefaultValue - default valuevoid addProperties(Properties properties)
properties - propertiesboolean containsKey(String key)
key - key – possible keyProperties asProperties()
NacosClientProperties derive()
NacosClientProperties derive(Properties properties)
properties - propertiesCopyright © 2018–2022 Alibaba Group. All rights reserved.