@Override public synchronized void addSubscription(SubscriptionInfo info, boolean retroactive) throws IOException { SubscriptionKey key = new SubscriptionKey(info); MemoryTopicSub sub = new MemoryTopicSub(key); topicSubMap.put(key, sub); if (retroactive) { for (Map.Entry<MessageId, Message> entry : messageTable.entrySet()) { sub.addMessage(entry.getKey(), entry.getValue()); } } subscriberDatabase.put(key, info); }
@Override public synchronized void addSubscription(SubscriptionInfo info, boolean retroactive) throws IOException { SubscriptionKey key = new SubscriptionKey(info); MemoryTopicSub sub = new MemoryTopicSub(key); topicSubMap.put(key, sub); if (retroactive) { for (Map.Entry<MessageId, Message> entry : messageTable.entrySet()) { sub.addMessage(entry.getKey(), entry.getValue()); } } subscriberDatabase.put(key, info); }
public synchronized void addSubsciption(SubscriptionInfo info, boolean retroactive) throws IOException { SubscriptionKey key = new SubscriptionKey(info); MemoryTopicSub sub = new MemoryTopicSub(); topicSubMap.put(key, sub); if (retroactive) { for (Iterator i = messageTable.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Entry)i.next(); sub.addMessage((MessageId)entry.getKey(), (Message)entry.getValue()); } } subscriberDatabase.put(key, info); }
@Override public synchronized void addSubscription(SubscriptionInfo info, boolean retroactive) throws IOException { SubscriptionKey key = new SubscriptionKey(info); MemoryTopicSub sub = new MemoryTopicSub(key); topicSubMap.put(key, sub); if (retroactive) { for (Map.Entry<MessageId, Message> entry : messageTable.entrySet()) { sub.addMessage(entry.getKey(), entry.getValue()); } } subscriberDatabase.put(key, info); }
@Override public synchronized void addSubscription(SubscriptionInfo info, boolean retroactive) throws IOException { SubscriptionKey key = new SubscriptionKey(info); MemoryTopicSub sub = new MemoryTopicSub(key); topicSubMap.put(key, sub); if (retroactive) { for (Map.Entry<MessageId, Message> entry : messageTable.entrySet()) { sub.addMessage(entry.getKey(), entry.getValue()); } } subscriberDatabase.put(key, info); }