📄 servercachehandler.java
字号:
/*
* Created on May 28, 2005
*
* Deals with all hashable data that can and will be needed
*/
package org.GTADS.server;
import java.util.*;
import java.net.*;
/**
* @author Administrator
*
* Cache naming conventions for hashtable is:
* keyValueCache to denote key -> value
* or
* objectNameCache to denote string key -> objectName
*/
public class ServerCacheHandler {
public static Hashtable socketStreamCache = new Hashtable();
public static Hashtable userSocketCache = new Hashtable();
public static Hashtable socketUserCache = new Hashtable();
public static Hashtable userPasswordCache = new Hashtable();
public static Hashtable chatroomUsersCache = new Hashtable();
public static Hashtable chatroomNameCache = new Hashtable();
public static Hashtable userChatroomCache = new Hashtable();
public static Hashtable userAdminCache = new Hashtable();
public static Hashtable friendsListCache = new Hashtable();
public static Hashtable userUptimeCache = new Hashtable();
public static Hashtable userLimitCache = new Hashtable();
public static Hashtable gameroomNameCache = new Hashtable();
public static Hashtable userGameroomCache = new Hashtable();
public static Hashtable userBannedIntervalCache = new Hashtable();
public static Hashtable ipBannedIntervalCache = new Hashtable();
public static Hashtable userPingTimeCache = new Hashtable();
public static Hashtable userProxyPortState = new Hashtable();
public static void setUserSocketCache(String user, Socket userSocket){
userSocketCache.put(user, userSocket);
socketUserCache.put(userSocket, user);
}
public static void removeUserSocketCache(String user, Socket userSocket){
if (user == null || userSocket == null)
return;
if (userSocketCache.containsKey(user) && socketUserCache.containsKey(userSocket)) {
userSocketCache.remove(user);
socketUserCache.remove(userSocket);
}
}
public static void removeUserFromChatroomCache(String username){
Vector searchableChatrooms;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -