fix(nacos-api): fix some property name

This commit is contained in:
chuntaojun 2019-06-14 16:56:28 +08:00
parent bce13d20ac
commit ac846dfe08
2 changed files with 56 additions and 2 deletions

View File

@ -46,9 +46,9 @@ public class PropertyKeyConst {
public final static String ENCODE = "encode";
public final static String CONFIG_LONG_POLL_TIMEOUT = "config.long-poll.timeout";
public final static String CONFIG_LONG_POLL_TIMEOUT = "configLongPollTimeout";
public final static String CONFIG_RETRY_TIME = "config.retry.time";
public final static String CONFIG_RETRY_TIME = "configRetryTime";
public final static String MAX_RETRY = "maxRetry";

View File

@ -76,6 +76,21 @@ public @interface NacosProperties {
*/
String ENCODE = "encode";
/**
* The property name of "long-poll.timeout"
*/
String CONFIG_LONG_POLL_TIMEOUT = "configLongPollTimeout";
/**
* The property name of "config.retry.time"
*/
String CONFIG_RETRY_TIME = "configRetryTime";
/**
* The property name of "maxRetry"
*/
String MAX_RETRY = "maxRetry";
/**
* The placeholder of endpoint, the value is <code>"${nacos.endpoint:}"</code>
*/
@ -116,6 +131,21 @@ public @interface NacosProperties {
*/
String ENCODE_PLACEHOLDER = "${" + PREFIX + ENCODE + ":UTF-8}";
/**
* The placeholder of {@link NacosProperties#CONFIG_LONG_POLL_TIMEOUT config.long-poll.timeout}, the value is <code>"${nacos.config.long-poll.timeout:30000}"</code>
*/
String CONFIG_LONG_POLL_TIMEOUT_PLACEHOLDER = "${" + PREFIX + CONFIG_LONG_POLL_TIMEOUT + ":30000}";
/**
* The placeholder of {@link NacosProperties#CONFIG_RETRY_TIME config.retry.time}, the value is <code>"${nacos.config.retry.time:2000}"</code>
*/
String CONFIG_RETRY_TIME_PLACEHOLDER = "${" + PREFIX + CONFIG_RETRY_TIME + ":2000}";
/**
* The placeholder of {@link NacosProperties#MAX_RETRY maxRetry}, the value is <code>"${nacos.maxRetry:3}"</code>
*/
String MAX_RETRY_PLACEHOLDER = "${" + PREFIX + MAX_RETRY + ":3}";
/**
* The property of "endpoint"
*
@ -180,4 +210,28 @@ public @interface NacosProperties {
*/
String encode() default ENCODE_PLACEHOLDER;
/**
* The property of "config.long-poll.timeout"
*
* @return "30000ms" as default value
* @see #CONFIG_LONG_POLL_TIMEOUT_PLACEHOLDER
*/
String configLongPollTimeout() default CONFIG_LONG_POLL_TIMEOUT_PLACEHOLDER;
/**
* The property of "config.retry.time"
*
* @return "2000ms" as default value
* @see #CONFIG_RETRY_TIME_PLACEHOLDER
*/
String configRetryTime() default CONFIG_RETRY_TIME_PLACEHOLDER;
/**
* The property of "maxRetry"
*
* @return "3" as default value
* @see #MAX_RETRY
*/
String maxRetry() default MAX_RETRY_PLACEHOLDER;
}