if (subs == null)
{
synchronized (this)
{
if ((subs = topicSub.defaultSubscriptions) == null)
topicSub.defaultSubscriptions = subs = new ConcurrentHashMap();
}
}
}
/* Subscribing with a selector - store all subscriptions under the selector key */
else
{
if (topicSub.selectorSubscriptions == null)
{
synchronized (this)
{
if (topicSub.selectorSubscriptions == null)
topicSub.selectorSubscriptions = new ConcurrentHashMap();
}
}
subs = (Map) topicSub.selectorSubscriptions.get(selector);
if (subs == null)
{
synchronized (this)
{
if ((subs = (Map) topicSub.selectorSubscriptions.get(selector)) == null)
topicSub.selectorSubscriptions.put(selector, subs = new ConcurrentHashMap());
}
}
}
if (subs.containsKey(clientId))