From 79be070e1bfc515139a67ae225482f3d0ad267c5 Mon Sep 17 00:00:00 2001 From: brotherlu-xcq <1285823170@qq.com> Date: Wed, 9 Jun 2021 10:17:45 +0800 Subject: [PATCH] [code quality] [nacos-client] [naming] simple the judge logic, constant export (#6009) --- .../client/naming/NacosNamingService.java | 10 ++- .../naming/backups/FailoverReactor.java | 40 +++++---- .../nacos/client/naming/beat/BeatReactor.java | 6 +- .../naming/cache/ConcurrentDiskUtil.java | 24 +++--- .../naming/cache/ServiceInfoHolder.java | 18 ++-- .../client/naming/core/PushReceiver.java | 13 ++- .../remote/AbstractNamingClientProxy.java | 20 +++-- .../remote/http/NamingHttpClientProxy.java | 86 ++++++++++++------- .../nacos/client/naming/utils/Chooser.java | 2 +- .../nacos/client/naming/utils/InitUtils.java | 6 +- .../nacos/client/naming/utils/SignUtil.java | 3 +- .../client/naming/utils/UtilAndComs.java | 6 ++ 12 files changed, 157 insertions(+), 77 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java index 83f7ccfc5..534aeff7a 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java @@ -52,6 +52,12 @@ import java.util.Properties; @SuppressWarnings("PMD.ServiceOrDaoClassShouldEndWithImplRule") public class NacosNamingService implements NamingService { + private static final String DEFAULT_NAMING_LOG_FILE_PATH = "naming.log"; + + private static final String UP = "UP"; + + private static final String DOWN = "DOWN"; + /** * Each Naming service should have different namespace. */ @@ -97,7 +103,7 @@ public class NacosNamingService implements NamingService { .isNotEmpty(properties.getProperty(UtilAndComs.NACOS_NAMING_LOG_NAME))) { logName = properties.getProperty(UtilAndComs.NACOS_NAMING_LOG_NAME); } else { - logName = "naming.log"; + logName = DEFAULT_NAMING_LOG_FILE_PATH; } } } @@ -441,7 +447,7 @@ public class NacosNamingService implements NamingService { @Override public String getServerStatus() { - return clientProxy.serverHealthy() ? "UP" : "DOWN"; + return clientProxy.serverHealthy() ? UP : DOWN; } @Override diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/backups/FailoverReactor.java b/client/src/main/java/com/alibaba/nacos/client/naming/backups/FailoverReactor.java index 1e7b0ca15..ff6e6b0b2 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/backups/FailoverReactor.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/backups/FailoverReactor.java @@ -52,6 +52,20 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; */ public class FailoverReactor implements Closeable { + private static final String FAILOVER_DIR = "/failover"; + + private static final String IS_FAILOVER_MODE = "1"; + + private static final String NO_FAILOVER_MODE = "0"; + + private static final String FAILOVER_MODE_PARAM = "failover-mode"; + + private Map serviceMap = new ConcurrentHashMap(); + + private final Map switchParams = new ConcurrentHashMap(); + + private static final long DAY_PERIOD_MINUTES = 24 * 60; + private final String failoverDir; private final ServiceInfoHolder serviceInfoHolder; @@ -60,7 +74,7 @@ public class FailoverReactor implements Closeable { public FailoverReactor(ServiceInfoHolder serviceInfoHolder, String cacheDir) { this.serviceInfoHolder = serviceInfoHolder; - this.failoverDir = cacheDir + "/failover"; + this.failoverDir = cacheDir + FAILOVER_DIR; // init executorService this.executorService = new ScheduledThreadPoolExecutor(1, new ThreadFactory() { @Override @@ -74,12 +88,6 @@ public class FailoverReactor implements Closeable { this.init(); } - private Map serviceMap = new ConcurrentHashMap(); - - private final Map switchParams = new ConcurrentHashMap(); - - private static final long DAY_PERIOD_MINUTES = 24 * 60; - /** * Init. */ @@ -159,17 +167,17 @@ public class FailoverReactor implements Closeable { for (String line : lines) { String line1 = line.trim(); - if ("1".equals(line1)) { - switchParams.put("failover-mode", "true"); + if (IS_FAILOVER_MODE.equals(line1)) { + switchParams.put(FAILOVER_MODE_PARAM, Boolean.TRUE.toString()); NAMING_LOGGER.info("failover-mode is on"); new FailoverFileReader().run(); - } else if ("0".equals(line1)) { - switchParams.put("failover-mode", "false"); + } else if (NO_FAILOVER_MODE.equals(line1)) { + switchParams.put(FAILOVER_MODE_PARAM, Boolean.FALSE.toString()); NAMING_LOGGER.info("failover-mode is off"); } } } else { - switchParams.put("failover-mode", "false"); + switchParams.put(FAILOVER_MODE_PARAM, Boolean.FALSE.toString()); } } @@ -257,9 +265,9 @@ public class FailoverReactor implements Closeable { ServiceInfo serviceInfo = entry.getValue(); if (StringUtils.equals(serviceInfo.getKey(), UtilAndComs.ALL_IPS) || StringUtils .equals(serviceInfo.getName(), UtilAndComs.ENV_LIST_KEY) || StringUtils - .equals(serviceInfo.getName(), "00-00---000-ENV_CONFIGS-000---00-00") || StringUtils - .equals(serviceInfo.getName(), "vipclient.properties") || StringUtils - .equals(serviceInfo.getName(), "00-00---000-ALL_HOSTS-000---00-00")) { + .equals(serviceInfo.getName(), UtilAndComs.ENV_CONFIGS) || StringUtils + .equals(serviceInfo.getName(), UtilAndComs.VIP_CLIENT_FILE) || StringUtils + .equals(serviceInfo.getName(), UtilAndComs.ALL_HOSTS)) { continue; } @@ -269,7 +277,7 @@ public class FailoverReactor implements Closeable { } public boolean isFailoverSwitch() { - return Boolean.parseBoolean(switchParams.get("failover-mode")); + return Boolean.parseBoolean(switchParams.get(FAILOVER_MODE_PARAM)); } public ServiceInfo getService(String key) { diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/beat/BeatReactor.java b/client/src/main/java/com/alibaba/nacos/client/naming/beat/BeatReactor.java index 1d39910e7..922777f3c 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/beat/BeatReactor.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/beat/BeatReactor.java @@ -49,6 +49,8 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; */ public class BeatReactor implements Closeable { + private static final String CLIENT_BEAT_INTERVAL_FIELD = "clientBeatInterval"; + private final ScheduledExecutorService executorService; private final NamingHttpClientProxy serverProxy; @@ -93,7 +95,7 @@ public class BeatReactor implements Closeable { public void addBeatInfo(String serviceName, BeatInfo beatInfo) { NAMING_LOGGER.info("[BEAT] adding beat: {} to beat map.", beatInfo); String key = buildKey(serviceName, beatInfo.getIp(), beatInfo.getPort()); - BeatInfo existBeat = null; + BeatInfo existBeat; //fix #1733 if ((existBeat = dom2Beat.remove(key)) != null) { existBeat.setStopped(true); @@ -178,7 +180,7 @@ public class BeatReactor implements Closeable { long nextTime = beatInfo.getPeriod(); try { JsonNode result = serverProxy.sendBeat(beatInfo, BeatReactor.this.lightBeatEnabled); - long interval = result.get("clientBeatInterval").asLong(); + long interval = result.get(CLIENT_BEAT_INTERVAL_FIELD).asLong(); boolean lightBeatEnabled = false; if (result.has(CommonParams.LIGHT_BEAT_ENABLED)) { lightBeatEnabled = result.get(CommonParams.LIGHT_BEAT_ENABLED).asBoolean(); diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/cache/ConcurrentDiskUtil.java b/client/src/main/java/com/alibaba/nacos/client/naming/cache/ConcurrentDiskUtil.java index eabb40eb3..e0000b592 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/cache/ConcurrentDiskUtil.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/cache/ConcurrentDiskUtil.java @@ -38,6 +38,14 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; */ public class ConcurrentDiskUtil { + private static final String READ_ONLY = "r"; + + private static final String READ_WRITE = "rw"; + + private static final int RETRY_COUNT = 10; + + private static final int SLEEP_BASETIME = 10; + /** * get file content. * @@ -63,7 +71,7 @@ public class ConcurrentDiskUtil { RandomAccessFile fis = null; FileLock rlock = null; try { - fis = new RandomAccessFile(file, "r"); + fis = new RandomAccessFile(file, READ_ONLY); FileChannel fcin = fis.getChannel(); int i = 0; do { @@ -128,7 +136,7 @@ public class ConcurrentDiskUtil { FileLock lock = null; RandomAccessFile raf = null; try { - raf = new RandomAccessFile(file, "rw"); + raf = new RandomAccessFile(file, READ_WRITE); channel = raf.getChannel(); int i = 0; do { @@ -192,12 +200,9 @@ public class ConcurrentDiskUtil { * @throws IOException IOException */ public static String byteBufferToString(ByteBuffer buffer, String charsetName) throws IOException { - Charset charset = null; - CharsetDecoder decoder = null; - CharBuffer charBuffer = null; - charset = Charset.forName(charsetName); - decoder = charset.newDecoder(); - charBuffer = decoder.decode(buffer.asReadOnlyBuffer()); + Charset charset = Charset.forName(charsetName); + CharsetDecoder decoder = charset.newDecoder(); + CharBuffer charBuffer = decoder.decode(buffer.asReadOnlyBuffer()); return charBuffer.toString(); } @@ -209,7 +214,4 @@ public class ConcurrentDiskUtil { } } - private static final int RETRY_COUNT = 10; - - private static final int SLEEP_BASETIME = 10; } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java b/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java index 8772dc76c..b5ab3d6c9 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java @@ -50,6 +50,14 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; */ public class ServiceInfoHolder implements Closeable { + private static final String JM_SNAPSHOT_PATH_PROPERTY = "JM.SNAPSHOT.PATH"; + + private static final String FILE_PATH_NACOS = "nacos"; + + private static final String FILE_PATH_NAMING = "naming"; + + private static final String USER_HOME_PROPERTY = "user.home"; + private final ConcurrentMap serviceInfoMap; private final FailoverReactor failoverReactor; @@ -70,7 +78,7 @@ public class ServiceInfoHolder implements Closeable { } private void initCacheDir(String namespace, Properties properties) { - String jmSnapshotPath = System.getProperty("JM.SNAPSHOT.PATH"); + String jmSnapshotPath = System.getProperty(JM_SNAPSHOT_PATH_PROPERTY); String namingCacheRegistryDir = ""; if (properties.getProperty(PropertyKeyConst.NAMING_CACHE_REGISTRY_DIR) != null) { @@ -78,11 +86,11 @@ public class ServiceInfoHolder implements Closeable { } if (!StringUtils.isBlank(jmSnapshotPath)) { - cacheDir = jmSnapshotPath + File.separator + "nacos" + namingCacheRegistryDir - + File.separator + "naming" + File.separator + namespace; + cacheDir = jmSnapshotPath + File.separator + FILE_PATH_NACOS + namingCacheRegistryDir + + File.separator + FILE_PATH_NAMING + File.separator + namespace; } else { - cacheDir = System.getProperty("user.home") + File.separator + "nacos" + namingCacheRegistryDir - + File.separator + "naming" + File.separator + namespace; + cacheDir = System.getProperty(USER_HOME_PROPERTY) + File.separator + FILE_PATH_NACOS + namingCacheRegistryDir + + File.separator + FILE_PATH_NAMING + File.separator + namespace; } } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/core/PushReceiver.java b/client/src/main/java/com/alibaba/nacos/client/naming/core/PushReceiver.java index 0f8e55fcc..3e9f36c26 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/core/PushReceiver.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/core/PushReceiver.java @@ -29,6 +29,7 @@ import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetSocketAddress; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; @@ -42,10 +43,16 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; */ public class PushReceiver implements Runnable, Closeable { - private static final Charset UTF_8 = Charset.forName("UTF-8"); + private static final Charset UTF_8 = StandardCharsets.UTF_8; private static final int UDP_MSS = 64 * 1024; + private static final String PUSH_PACKAGE_TYPE_DOM = "dom"; + + private static final String PUSH_PACKAGE_TYPE_SERVICE = "service"; + + private static final String PUSH_PACKAGE_TYPE_DUMP = "dump"; + private ScheduledExecutorService executorService; private DatagramSocket udpSocket; @@ -99,13 +106,13 @@ public class PushReceiver implements Runnable, Closeable { PushPacket pushPacket = JacksonUtils.toObj(json, PushPacket.class); String ack; - if ("dom".equals(pushPacket.type) || "service".equals(pushPacket.type)) { + if (PUSH_PACKAGE_TYPE_DOM.equals(pushPacket.type) || PUSH_PACKAGE_TYPE_SERVICE.equals(pushPacket.type)) { serviceInfoHolder.processServiceInfo(pushPacket.data); // send ack to server ack = "{\"type\": \"push-ack\"" + ", \"lastRefTime\":\"" + pushPacket.lastRefTime + "\", \"data\":" + "\"\"}"; - } else if ("dump".equals(pushPacket.type)) { + } else if (PUSH_PACKAGE_TYPE_DUMP.equals(pushPacket.type)) { // dump data to server ack = "{\"type\": \"dump-ack\"" + ", \"lastRefTime\": \"" + pushPacket.lastRefTime + "\", \"data\":" + "\"" + StringUtils.escapeJavaScript(JacksonUtils.toJson(serviceInfoHolder.getServiceInfoMap())) diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxy.java b/client/src/main/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxy.java index b0b73c752..794b8c79e 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxy.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxy.java @@ -41,6 +41,16 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; public abstract class AbstractNamingClientProxy extends Subscriber implements NamingClientProxy { + private static final String APP_FILED = "app"; + + private static final String SIGNATURE_FILED = "signature"; + + private static final String DATA_FILED = "data"; + + private static final String AK_FILED = "ak"; + + private static final String SEPARATOR = "@@"; + private final SecurityProxy securityProxy; private final Properties properties; @@ -73,14 +83,14 @@ public abstract class AbstractNamingClientProxy extends Subscriber result = new HashMap<>(2); String ak = getAccessKey(); String sk = getSecretKey(); - result.put("app", AppNameUtils.getAppName()); + result.put(APP_FILED, AppNameUtils.getAppName()); if (StringUtils.isNotBlank(ak) && StringUtils.isNotBlank(sk)) { try { String signData = getSignData(serviceName); String signature = SignUtil.sign(signData, sk); - result.put("signature", signature); - result.put("data", signData); - result.put("ak", ak); + result.put(SIGNATURE_FILED, signature); + result.put(DATA_FILED, signData); + result.put(AK_FILED, ak); } catch (Exception e) { NAMING_LOGGER.error("inject ak/sk failed.", e); } @@ -105,7 +115,7 @@ public abstract class AbstractNamingClientProxy extends Subscriber params = new HashMap(8); params.put(CommonParams.NAMESPACE_ID, namespaceId); params.put(CommonParams.SERVICE_NAME, NamingUtils.getGroupedName(serviceName, groupName)); - params.put("clusters", clusters); - params.put("udpPort", String.valueOf(udpPort)); - params.put("clientIP", NetUtils.localIP()); - params.put("healthyOnly", String.valueOf(healthyOnly)); + params.put(CLUSTERS_PARAM, clusters); + params.put(UDP_PORT_PARAM, String.valueOf(udpPort)); + params.put(CLIENT_IP_PARAM, NetUtils.localIP()); + params.put(HEALTHY_ONLY_PARAM, String.valueOf(healthyOnly)); String result = reqApi(UtilAndComs.nacosUrlBase + "/instance/list", params, HttpMethod.GET); if (StringUtils.isNotEmpty(result)) { return JacksonUtils.toObj(result, ServiceInfo.class); @@ -217,9 +245,9 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy { params.put(CommonParams.NAMESPACE_ID, namespaceId); params.put(CommonParams.SERVICE_NAME, service.getName()); params.put(CommonParams.GROUP_NAME, service.getGroupName()); - params.put("protectThreshold", String.valueOf(service.getProtectThreshold())); - params.put("metadata", JacksonUtils.toJson(service.getMetadata())); - params.put("selector", JacksonUtils.toJson(selector)); + params.put(PROTECT_THRESHOLD_PARAM, String.valueOf(service.getProtectThreshold())); + params.put(META_PARAM, JacksonUtils.toJson(service.getMetadata())); + params.put(SELECTOR_PARAM, JacksonUtils.toJson(selector)); reqApi(UtilAndComs.nacosUrlService, params, HttpMethod.POST); @@ -247,9 +275,9 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy { params.put(CommonParams.NAMESPACE_ID, namespaceId); params.put(CommonParams.SERVICE_NAME, service.getName()); params.put(CommonParams.GROUP_NAME, service.getGroupName()); - params.put("protectThreshold", String.valueOf(service.getProtectThreshold())); - params.put("metadata", JacksonUtils.toJson(service.getMetadata())); - params.put("selector", JacksonUtils.toJson(selector)); + params.put(PROTECT_THRESHOLD_PARAM, String.valueOf(service.getProtectThreshold())); + params.put(META_PARAM, JacksonUtils.toJson(service.getMetadata())); + params.put(SELECTOR_PARAM, JacksonUtils.toJson(selector)); reqApi(UtilAndComs.nacosUrlService, params, HttpMethod.PUT); } @@ -275,8 +303,8 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy { params.put(CommonParams.NAMESPACE_ID, namespaceId); params.put(CommonParams.SERVICE_NAME, beatInfo.getServiceName()); params.put(CommonParams.CLUSTER_NAME, beatInfo.getCluster()); - params.put("ip", beatInfo.getIp()); - params.put("port", String.valueOf(beatInfo.getPort())); + params.put(IP_PARAM, beatInfo.getIp()); + params.put(PORT_PARAM, String.valueOf(beatInfo.getPort())); String result = reqApi(UtilAndComs.nacosUrlBase + "/instance/beat", params, bodyMap, HttpMethod.PUT); return JacksonUtils.toObj(result); } @@ -311,7 +339,7 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy { break; case label: ExpressionSelector expressionSelector = (ExpressionSelector) selector; - params.put("selector", JacksonUtils.toJson(expressionSelector)); + params.put(SELECTOR_PARAM, JacksonUtils.toJson(expressionSelector)); break; default: break; @@ -434,7 +462,7 @@ public class NamingHttpClientProxy extends AbstractNamingClientProxy { long start = System.currentTimeMillis(); long end = 0; params.putAll(getSecurityHeaders()); - params.putAll(getSpasHeaders(params.get("serviceName"))); + params.putAll(getSpasHeaders(params.get(SERVICE_NAME_PARAM))); Header header = NamingHttpUtil.builderHeader(); String url; diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java index 62f62c4ae..ee5ca9f32 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/Chooser.java @@ -63,7 +63,7 @@ public class Chooser { return ref.items.get(index); } - if (index >= 0 && index < ref.weights.length) { + if (index < ref.weights.length) { if (random < ref.weights[index]) { return ref.items.get(index); } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/InitUtils.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/InitUtils.java index 133b2e04a..cf5224f2c 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/InitUtils.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/InitUtils.java @@ -41,6 +41,8 @@ import java.util.concurrent.Callable; */ public class InitUtils { + private static final String DEFAULT_END_POINT_PORT = "8080"; + /** * Add a difference to the name naming. This method simply initializes the namespace for Naming. Config * initialization is not the same, so it cannot be reused directly. @@ -86,7 +88,7 @@ public class InitUtils { } }); - if (StringUtils.isEmpty(tmpNamespace) && properties != null) { + if (StringUtils.isEmpty(tmpNamespace)) { tmpNamespace = properties.getProperty(PropertyKeyConst.NAMESPACE); } @@ -180,7 +182,7 @@ public class InitUtils { endpointPort = TemplateUtils.stringEmptyAndThenExecute(endpointPort, new Callable() { @Override public String call() { - return "8080"; + return DEFAULT_END_POINT_PORT; } }); diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/SignUtil.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/SignUtil.java index 900350920..55a94fcc5 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/SignUtil.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/SignUtil.java @@ -21,6 +21,7 @@ import com.alibaba.nacos.common.codec.Base64; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Sign util. @@ -30,7 +31,7 @@ import java.nio.charset.Charset; */ public class SignUtil { - private static final Charset UTF8 = Charset.forName("UTF-8"); + private static final Charset UTF8 = StandardCharsets.UTF_8; public SignUtil() { } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/UtilAndComs.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/UtilAndComs.java index 5fddf056b..dc18cbfc5 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/UtilAndComs.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/UtilAndComs.java @@ -64,4 +64,10 @@ public class UtilAndComs { public static final String HTTPS = "https://"; + public static final String ENV_CONFIGS = "00-00---000-ENV_CONFIGS-000---00-00"; + + public static final String VIP_CLIENT_FILE = "vipclient.properties"; + + public static final String ALL_HOSTS = "00-00---000-ALL_HOSTS-000---00-00"; + }