Using ConcurrentMap instead on MQTTSessionState"

This commit is contained in:
Clebert Suconic 2015-07-22 11:43:53 +01:00
parent 5a57bf6f29
commit 5c4511b59f
1 changed files with 6 additions and 5 deletions

View File

@ -17,17 +17,18 @@
package org.apache.activemq.artemis.core.protocol.mqtt;
import io.netty.handler.codec.mqtt.MqttTopicSubscription;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.core.server.ServerMessage;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
import io.netty.handler.codec.mqtt.MqttTopicSubscription;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.core.server.ServerMessage;
public class MQTTSessionState
{
private String clientId;
@ -52,7 +53,7 @@ public class MQTTSessionState
// Objects track the Outbound message references
private Map<Integer, Pair<String, Long>> outboundMessageReferenceStore;
private ConcurrentHashMap<String, ConcurrentHashMap<Long, Integer>> reverseOutboundReferenceStore;
private ConcurrentMap<String, ConcurrentHashMap<Long, Integer>> reverseOutboundReferenceStore;
private final Object outboundLock = new Object();