Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/alibaba/nacos into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
xuechaos committed Dec 7, 2018
2 parents 67107d8 + baa7916 commit 3ab06bc
Show file tree
Hide file tree
Showing 539 changed files with 32,107 additions and 533,068 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ It is super easy to get started with your first project.

You can download the package from the [latest stable release](https://github.com/alibaba/nacos/releases).

Take release nacos-server-0.4.0.zip for example.
Take release nacos-server-0.5.0.zip for example.
```
unzip nacos-server-0.4.0.zip
unzip nacos-server-0.5.0.zip
cd nacos/bin
```

Expand Down
91 changes: 41 additions & 50 deletions api/src/main/java/com/alibaba/nacos/api/NacosFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,62 +25,53 @@

/**
* Nacos Factory
*
* @author Nacos
*
* @author Nacos
*/
public class NacosFactory {

/**
* Create config
*
* @param properties
* init param
* @return config
* @throws NacosException
* Exception
*/
public static ConfigService createConfigService(Properties properties) throws NacosException {
return ConfigFactory.createConfigService(properties);
}
/**
* Create config
*
* @param properties init param
* @return config
* @throws NacosException Exception
*/
public static ConfigService createConfigService(Properties properties) throws NacosException {
return ConfigFactory.createConfigService(properties);
}

/**
* Create config
*
* @param serverAddr
* server list
* @return config
* @throws NacosException
* Exception
*/
public static ConfigService createConfigService(String serverAddr) throws NacosException {
return ConfigFactory.createConfigService(serverAddr);
}
/**
* Create config
*
* @param serverAddr server list
* @return config
* @throws NacosException Exception
*/
public static ConfigService createConfigService(String serverAddr) throws NacosException {
return ConfigFactory.createConfigService(serverAddr);
}

/**
* Create Naming
*
* @param serverAddr
* server list
* @return Naming
* @throws NacosException
* Exception
*/
public static NamingService createNamingService(String serverAddr) throws NacosException {
return NamingFactory.createNamingService(serverAddr);
}
/**
* Create Naming
*
* @param serverAddr server list
* @return Naming
* @throws NacosException Exception
*/
public static NamingService createNamingService(String serverAddr) throws NacosException {
return NamingFactory.createNamingService(serverAddr);
}

/**
* Create Naming
*
* @param properties
* init param
* @return Naming
* @throws NacosException
* Exception
*/
public static NamingService createNamingService(Properties properties) throws NacosException {
return NamingFactory.createNamingService(properties);
}
/**
* Create Naming
*
* @param properties init param
* @return Naming
* @throws NacosException Exception
*/
public static NamingService createNamingService(Properties properties) throws NacosException {
return NamingFactory.createNamingService(properties);
}

}
22 changes: 11 additions & 11 deletions api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@

/**
* properties key
* @author Nacos
*
* @author Nacos
*/
public class PropertyKeyConst {

public final static String ENDPOINT = "endpoint";
public final static String NAMESPACE = "namespace";
public final static String ACCESS_KEY = "accessKey";
public final static String SECRET_KEY = "secretKey";
public final static String SERVER_ADDR = "serverAddr";
public final static String CONTEXT_PATH = "contextPath";
public final static String CLUSTER_NAME = "clusterName";
public final static String ENCODE = "encode";
public final static String NAMING_LOAD_CACHE_AT_START = "namingLoadCacheAtStart";
public final static String ENDPOINT = "endpoint";
public final static String NAMESPACE = "namespace";
public final static String ACCESS_KEY = "accessKey";
public final static String SECRET_KEY = "secretKey";
public final static String SERVER_ADDR = "serverAddr";
public final static String CONTEXT_PATH = "contextPath";
public final static String CLUSTER_NAME = "clusterName";
public final static String ENCODE = "encode";
public final static String NAMING_LOAD_CACHE_AT_START = "namingLoadCacheAtStart";

}
131 changes: 65 additions & 66 deletions api/src/main/java/com/alibaba/nacos/api/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,115 +17,114 @@

/**
* Constant
*
* @author Nacos
*
* @author Nacos
*/
public class Constants {

public static final String CLIENT_VERSION_HEADER = "Client-Version";
public static final String CLIENT_VERSION_HEADER = "Client-Version";

public static final String CLIENT_VERSION = "3.0.0";
public static final String CLIENT_VERSION = "3.0.0";

public static int DATA_IN_BODY_VERSION = 204;
public static int DATA_IN_BODY_VERSION = 204;

public static final String DEFAULT_GROUP = "DEFAULT_GROUP";
public static final String DEFAULT_GROUP = "DEFAULT_GROUP";

public static final String APPNAME = "AppName";
public static final String APPNAME = "AppName";

public static final String UNKNOWN_APP = "UnknownApp";
public static final String UNKNOWN_APP = "UnknownApp";

public static final String DEFAULT_DOMAINNAME = "commonconfig.config-host.taobao.com";
public static final String DEFAULT_DOMAINNAME = "commonconfig.config-host.taobao.com";

public static final String DAILY_DOMAINNAME = "commonconfig.taobao.net";
public static final String DAILY_DOMAINNAME = "commonconfig.taobao.net";

public static final String NULL = "";
public static final String NULL = "";

public static final String DATAID = "dataId";
public static final String DATAID = "dataId";

public static final String GROUP = "group";
public static final String GROUP = "group";

public static final String LAST_MODIFIED = "Last-Modified";
public static final String LAST_MODIFIED = "Last-Modified";

public static final String ACCEPT_ENCODING = "Accept-Encoding";
public static final String ACCEPT_ENCODING = "Accept-Encoding";

public static final String CONTENT_ENCODING = "Content-Encoding";
public static final String CONTENT_ENCODING = "Content-Encoding";

public static final String PROBE_MODIFY_REQUEST = "Listening-Configs";
public static final String PROBE_MODIFY_REQUEST = "Listening-Configs";

public static final String PROBE_MODIFY_RESPONSE = "Probe-Modify-Response";
public static final String PROBE_MODIFY_RESPONSE = "Probe-Modify-Response";

public static final String PROBE_MODIFY_RESPONSE_NEW = "Probe-Modify-Response-New";
public static final String PROBE_MODIFY_RESPONSE_NEW = "Probe-Modify-Response-New";

public static final String USE_ZIP = "true";
public static final String USE_ZIP = "true";

public static final String CONTENT_MD5 = "Content-MD5";
public static final String CONTENT_MD5 = "Content-MD5";

public static final String CONFIG_VERSION = "Config-Version";
public static final String CONFIG_VERSION = "Config-Version";

public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
public static final String IF_MODIFIED_SINCE = "If-Modified-Since";

public static final String SPACING_INTERVAL = "client-spacing-interval";
public static final String SPACING_INTERVAL = "client-spacing-interval";

public static final String BASE_PATH = "/v1/cs";
public static final String BASE_PATH = "/v1/cs";

public static final String CONFIG_CONTROLLER_PATH = BASE_PATH + "/configs";
public static final String CONFIG_CONTROLLER_PATH = BASE_PATH + "/configs";

/**
* second
*/
public static final int ASYNC_UPDATE_ADDRESS_INTERVAL = 300;
/**
* second
*/
public static final int ASYNC_UPDATE_ADDRESS_INTERVAL = 300;

/**
* second
*/
public static final int POLLING_INTERVAL_TIME = 15;
/**
* second
*/
public static final int POLLING_INTERVAL_TIME = 15;

/**
* millisecond
*/
public static final int ONCE_TIMEOUT = 2000;
/**
* millisecond
*/
public static final int ONCE_TIMEOUT = 2000;

/**
* millisecond
*/
public static final int CONN_TIMEOUT = 2000;
/**
* millisecond
*/
public static final int CONN_TIMEOUT = 2000;

/**
* millisecond
*/
public static final int SO_TIMEOUT = 60000;
/**
* millisecond
*/
public static final int SO_TIMEOUT = 60000;

/**
* millisecond
*/
public static final int RECV_WAIT_TIMEOUT = ONCE_TIMEOUT * 5;
/**
* millisecond
*/
public static final int RECV_WAIT_TIMEOUT = ONCE_TIMEOUT * 5;

public static final String ENCODE = "UTF-8";
public static final String ENCODE = "UTF-8";

public static final String MAP_FILE = "map-file.js";
public static final String MAP_FILE = "map-file.js";

public static final int FLOW_CONTROL_THRESHOLD = 20;
public static final int FLOW_CONTROL_THRESHOLD = 20;

public static final int FLOW_CONTROL_SLOT = 10;
public static final int FLOW_CONTROL_SLOT = 10;

public static final int FLOW_CONTROL_INTERVAL = 1000;
public static final int FLOW_CONTROL_INTERVAL = 1000;

public static final String LINE_SEPARATOR = Character.toString((char) 1);
public static final String LINE_SEPARATOR = Character.toString((char)1);

public static final String WORD_SEPARATOR = Character.toString((char) 2);
public static final String WORD_SEPARATOR = Character.toString((char)2);

public static final String LONGPULLING_LINE_SEPARATOR = "\r\n";
public static final String LONGPULLING_LINE_SEPARATOR = "\r\n";

public static final String CLIENT_APPNAME_HEADER = "Client-AppName";
public static final String CLIENT_REQUEST_TS_HEADER = "Client-RequestTS";
public static final String CLIENT_REQUEST_TOKEN_HEADER = "Client-RequestToken";
public static final String CLIENT_APPNAME_HEADER = "Client-AppName";
public static final String CLIENT_REQUEST_TS_HEADER = "Client-RequestTS";
public static final String CLIENT_REQUEST_TOKEN_HEADER = "Client-RequestToken";

public static final int ATOMIC_MAX_SIZE = 1000;
public static final int ATOMIC_MAX_SIZE = 1000;

public static final String NAMING_INSTANCE_ID_SPLITTER = "#";
public static final int NAMING_INSTANCE_ID_SEG_COUNT = 4;
public static final String NAMING_HTTP_HEADER_SPILIER = "\\|";
public static final String NAMING_INSTANCE_ID_SPLITTER = "#";
public static final int NAMING_INSTANCE_ID_SEG_COUNT = 4;
public static final String NAMING_HTTP_HEADER_SPILIER = "\\|";

public static final String NAMING_DEFAULT_CLUSTER_NAME = "DEFAULT";
public static final String NAMING_DEFAULT_CLUSTER_NAME = "DEFAULT";
}
Loading

0 comments on commit 3ab06bc

Please sign in to comment.