提交 e6f455ff 编写于 作者: 如梦技术's avatar 如梦技术 🐛

代码优化。

上级 3baa384c
......@@ -35,7 +35,7 @@ public class InMemoryMqttSessionManager implements IMqttSessionManager {
/**
* clientId: messageId
*/
private final Map<String, AtomicInteger> messageIdStore = new ConcurrentHashMap<>();
private final ConcurrentMap<String, AtomicInteger> messageIdStore = new ConcurrentHashMap<>();
/**
* clientId: {topicFilter: SubscribeStore}
*/
......@@ -43,11 +43,11 @@ public class InMemoryMqttSessionManager implements IMqttSessionManager {
/**
* clientId: {msgId: Object}
*/
private final Map<String, Map<Integer, MqttPendingPublish>> pendingPublishStore = new ConcurrentHashMap<>();
private final ConcurrentMap<String, Map<Integer, MqttPendingPublish>> pendingPublishStore = new ConcurrentHashMap<>();
/**
* clientId: {msgId: Object}
*/
private final Map<String , Map<Integer, MqttPendingQos2Publish>> pendingQos2PublishStore = new ConcurrentHashMap<>();
private final ConcurrentMap<String , Map<Integer, MqttPendingQos2Publish>> pendingQos2PublishStore = new ConcurrentHashMap<>();
@Override
public void addSubscribe(String clientId, String topicFilter, MqttQoS mqttQoS) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册