mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-21 02:24:15 +00:00
perf[session]: use primitive type in SessionManager
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user