作者 crossoverJie

:bulb: Documenting source code.

... ... @@ -41,11 +41,11 @@ public class ServerCache {
/**
* 更新所有缓存/先删除 再新增
*
* @param currentChilds
* @param currentChildren
*/
public void updateCache(List<String> currentChilds) {
public void updateCache(List<String> currentChildren) {
cache.invalidateAll();
for (String currentChild : currentChilds) {
for (String currentChild : currentChildren) {
// currentChild=ip-127.0.0.1:11212:9082 or 127.0.0.1:11212:9082
String key ;
if (currentChild.split("-").length == 2){
... ...
... ... @@ -22,19 +22,19 @@ app.zk.connect.timeout=15000
app.zk.root=/route
#路由策略,轮询
app.route.way=com.crossoverjie.cim.common.route.algorithm.loop.LoopHandle
#app.route.way=com.crossoverjie.cim.common.route.algorithm.loop.LoopHandle
#路由策略,随机
#app.route.way=com.crossoverjie.cim.common.route.algorithm.random.RandomHandle
#路由策略,一致性 hash
#app.route.way=com.crossoverjie.cim.common.route.algorithm.consistenthash.ConsistentHashHandle
app.route.way=com.crossoverjie.cim.common.route.algorithm.consistenthash.ConsistentHashHandle
#一致性 hash 算法具体实现--自定义有序 map
#app.route.way.consitenthash=com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHash
#一致性 hash 算法具体实现--TreeMap
#app.route.way.consitenthash=com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHash
app.route.way.consitenthash=com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHash
# Redis 配置
spring.redis.host=xx
... ...