perf[session]: use primitive type in SessionManager

This commit is contained in:
godotg
2022-12-23 18:55:00 +08:00
parent f1f991c742
commit 4cec1a0574
3 changed files with 5 additions and 5 deletions
@@ -318,7 +318,7 @@ public class Router implements IRouter {
}
}
// 调用PacketReceiver,进行真正的业务处理,这个submit只是根据packet找到protocolId,然后进行反射调用
// 调用PacketReceiver,进行真正的业务处理,这个submit只是根据packet找到protocolId,然后调用对应的消息处理方法
// 这个在哪个线程处理取决于:这个上层的PacketReceiverTask被丢到了哪个线程中
PacketBus.route(session, packet, attachment);
} catch (Exception e) {
@@ -24,7 +24,7 @@ public interface ISessionManager {
void removeServerSession(Session session);
Session getServerSession(Long id);
Session getServerSession(long id);
Map<Long, Session> getServerSessionMap();
@@ -33,7 +33,7 @@ public interface ISessionManager {
void removeClientSession(Session session);
Session getClientSession(Long id);
Session getClientSession(long id);
Map<Long, Session> getClientSessionMap();
@@ -66,7 +66,7 @@ public class SessionManager implements ISessionManager {
}
@Override
public Session getServerSession(Long id) {
public Session getServerSession(long id) {
return serverSessionMap.get(id);
}
@@ -97,7 +97,7 @@ public class SessionManager implements ISessionManager {
}
@Override
public Session getClientSession(Long id) {
public Session getClientSession(long id) {
return clientSessionMap.get(id);
}