diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2008-06-06 21:14:23 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2008-06-06 21:14:23 +0000 |
| commit | bd73b54ba9b366918d9c073817187eecf946b8d5 (patch) | |
| tree | 3d7baccf6d7b97c87a0e509fde4add623ce6335b /qpid/java/client | |
| parent | 41dce45772f586e18444267e2246b097d04ef28d (diff) | |
| download | qpid-python-bd73b54ba9b366918d9c073817187eecf946b8d5.tar.gz | |
QPID-1124 : Use thread-safe map for messageListeners
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@664129 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpidity/nclient/impl/ClientSession.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpidity/nclient/impl/ClientSession.java b/qpid/java/client/src/main/java/org/apache/qpidity/nclient/impl/ClientSession.java index 0c0341490a..f7d54a681f 100644 --- a/qpid/java/client/src/main/java/org/apache/qpidity/nclient/impl/ClientSession.java +++ b/qpid/java/client/src/main/java/org/apache/qpidity/nclient/impl/ClientSession.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.apache.qpidity.QpidException; import org.apache.qpidity.api.Message; @@ -48,7 +49,7 @@ public class ClientSession extends org.apache.qpidity.transport.Session implemen private static long MAX_NOT_SYNC_DATA_LENGH; private static long MAX_NOT_FLUSH_DATA_LENGH; - private Map<String,MessagePartListener> _messageListeners = new HashMap<String,MessagePartListener>(); + private Map<String,MessagePartListener> _messageListeners = new ConcurrentHashMap<String,MessagePartListener>(); private ClosedListener _exceptionListner; private RangeSet _rejectedMessages; private long _currentDataSizeNotSynced; @@ -196,7 +197,7 @@ public class ClientSession extends org.apache.qpidity.transport.Session implemen _exceptionListner.onClosed(null, null, null); } - Map<String,MessagePartListener> getMessageListerners() + Map<String,MessagePartListener> getMessageListeners() { return _messageListeners; } |
