generated from root/miduo_server
清除冗余公会信息
parent
b2c112943a
commit
12ddeb327a
|
@ -107,8 +107,10 @@ public class GuilidManager {
|
||||||
}
|
}
|
||||||
guildLogInfoMap.get(guildLog.getGuildId()).add(guildLog);
|
guildLogInfoMap.get(guildLog.getGuildId()).add(guildLog);
|
||||||
}
|
}
|
||||||
|
int size = 0;
|
||||||
if(uids.size() > 0){
|
if(uids.size() > 0){
|
||||||
List<PlayerInfoCache> infos = RedisUtil.getInstence().hmget(RedisKey.PLAYER_INFO_CACHE + RedisKey.Delimiter_colon, uids, PlayerInfoCache.class);
|
List<PlayerInfoCache> infos = RedisUtil.getInstence().hmget(RedisKey.PLAYER_INFO_CACHE + RedisKey.Delimiter_colon, uids, PlayerInfoCache.class);
|
||||||
|
size = infos.size();
|
||||||
if(infos != null && infos.size() > 0) {
|
if(infos != null && infos.size() > 0) {
|
||||||
for (PlayerInfoCache userCache :infos){
|
for (PlayerInfoCache userCache :infos){
|
||||||
//放置用户基本信息到内存中
|
//放置用户基本信息到内存中
|
||||||
|
@ -116,14 +118,14 @@ public class GuilidManager {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
LOGGER.info("加载公会成员缓存数据:{}条", uids.size());
|
LOGGER.info("加载公会成员缓存数据:{}条", size);
|
||||||
//清除离线大于7天的公会成员信息
|
//清除离线大于7天的公会成员信息
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
for(GuildInfo guildInfo : guildInfoMap.values()){
|
for(GuildInfo guildInfo : guildInfoMap.values()){
|
||||||
clearGuildMember(guildInfo,now);
|
clearGuildMember(guildInfo,now);
|
||||||
}
|
}
|
||||||
MongoUtil.getInstence().lastUpdate();
|
|
||||||
LOGGER.info("清理冗余公会成员信息耗时:{}ms", System.currentTimeMillis() - now);
|
LOGGER.info("清理冗余公会成员信息耗时:{}ms", System.currentTimeMillis() - now);
|
||||||
|
MongoUtil.getInstence().lastUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue