Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
夜色 committed Jun 9, 2018
1 parent d9bd09d commit 2f85bb1
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -37,7 +37,11 @@
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;


//查询使用 /**
* 在线列表是存在redis里的,服务被kill -9的时候,无法修改redis。
* 查询全部在线列表的时候,要通过当前ZK里可用的机器来循环查询。
* 每台机器的在线列表是分开存的,如果都存储在一起,某台机器挂了,反而不好处理。
*/
public final class UserManager { public final class UserManager {
private static final Logger LOGGER = LoggerFactory.getLogger(UserManager.class); private static final Logger LOGGER = LoggerFactory.getLogger(UserManager.class);


Expand Down Expand Up @@ -76,7 +80,7 @@ public void kickUser(String userId, int clientType) {
} }
} }


public void clearUserOnlineData() { public void clearOnlineUserList() {
cacheManager.del(onlineUserListKey); cacheManager.del(onlineUserListKey);
} }


Expand Down

0 comments on commit 2f85bb1

Please sign in to comment.