@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { TopicMessageStore rc = topics.get(destination); if (rc == null) { rc = new MemoryTopicMessageStore(destination); if (transactionStore != null) { rc = transactionStore.proxy(rc); } topics.put(destination, rc); } return rc; }
public MemoryTopicMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable, Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase) { super(destination, messageTable); this.subscriberDatabase = subscriberDatabase; this.topicSubMap = makeSubMap(); // this is only necessary so that messageStoreStatistics can be set if // necessary We need the original reference since messageTable is wrapped // in a synchronized map in the parent class this.originalMessageTable = messageTable; }
public MemoryTopicMessageStore(ActiveMQDestination destination) { this(destination, new MemoryTopicMessageStoreLRUCache(100, 100, 0.75f, false), makeSubscriptionInfoMap()); // Set the messageStoreStatistics after the super class is initialized // so that the stats can be properly updated on cache eviction MemoryTopicMessageStoreLRUCache cache = (MemoryTopicMessageStoreLRUCache) originalMessageTable; cache.setMessageStoreStatistics(messageStoreStatistics); }
@Override public synchronized void deleteSubscription(String clientId, String subscriptionName) { SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName); subscriberDatabase.remove(key); MemoryTopicSub subscription = topicSubMap.get(key); if (subscription != null) { List<Message> storedMessages = subscription.getStoredMessages(); for (Message message : storedMessages) { try { acknowledge(null, key.getClientId(), key.getSubscriptionName(), message.getMessageId(), null); } catch (IOException e) { } } } subscriberDatabase.remove(key); topicSubMap.remove(key); }
@Override public synchronized void deleteSubscription(String clientId, String subscriptionName) { SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName); subscriberDatabase.remove(key); MemoryTopicSub subscription = topicSubMap.get(key); if (subscription != null) { List<Message> storedMessages = subscription.getStoredMessages(); for (Message message : storedMessages) { try { acknowledge(null, key.getClientId(), key.getSubscriptionName(), message.getMessageId(), null); } catch (IOException e) { } } } subscriberDatabase.remove(key); topicSubMap.remove(key); }
public MemoryTopicMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable, Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase) { super(destination, messageTable); this.subscriberDatabase = subscriberDatabase; this.topicSubMap = makeSubMap(); // this is only necessary so that messageStoreStatistics can be set if // necessary We need the original reference since messageTable is wrapped // in a synchronized map in the parent class this.originalMessageTable = messageTable; }
public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { TopicMessageStore rc = topics.get(destination); if (rc == null) { rc = new MemoryTopicMessageStore(destination); if (transactionStore != null) { rc = transactionStore.proxy(rc); } topics.put(destination, rc); } return rc; }
public MemoryTopicMessageStore(ActiveMQDestination destination) { this(destination, new LRUCache<MessageId, Message>(100, 100, 0.75f, false), makeSubscriptionInfoMap()); }
@Override public synchronized void deleteSubscription(String clientId, String subscriptionName) { SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName); subscriberDatabase.remove(key); MemoryTopicSub subscription = topicSubMap.get(key); if (subscription != null) { List<Message> storedMessages = subscription.getStoredMessages(); for (Message message : storedMessages) { try { acknowledge(null, key.getClientId(), key.getSubscriptionName(), message.getMessageId(), null); } catch (IOException e) { } } } subscriberDatabase.remove(key); topicSubMap.remove(key); }
public MemoryTopicMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable, Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase) { super(destination, messageTable); this.subscriberDatabase = subscriberDatabase; this.topicSubMap = makeSubMap(); // this is only necessary so that messageStoreStatistics can be set if // necessary We need the original reference since messageTable is wrapped // in a synchronized map in the parent class this.originalMessageTable = messageTable; }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { TopicMessageStore rc = topics.get(destination); if (rc == null) { rc = new MemoryTopicMessageStore(destination); if (transactionStore != null) { rc = transactionStore.proxy(rc); } topics.put(destination, rc); } return rc; }
public MemoryTopicMessageStore(ActiveMQDestination destination) { this(destination, new MemoryTopicMessageStoreLRUCache(100, 100, 0.75f, false), makeSubscriptionInfoMap()); // Set the messageStoreStatistics after the super class is initialized // so that the stats can be properly updated on cache eviction MemoryTopicMessageStoreLRUCache cache = (MemoryTopicMessageStoreLRUCache) originalMessageTable; cache.setMessageStoreStatistics(messageStoreStatistics); }
@Override public synchronized void deleteSubscription(String clientId, String subscriptionName) { SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName); subscriberDatabase.remove(key); MemoryTopicSub subscription = topicSubMap.get(key); if (subscription != null) { List<Message> storedMessages = subscription.getStoredMessages(); for (Message message : storedMessages) { try { acknowledge(null, key.getClientId(), key.getSubscriptionName(), message.getMessageId(), null); } catch (IOException e) { } } } subscriberDatabase.remove(key); topicSubMap.remove(key); }
public MemoryTopicMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable, Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase) { super(destination, messageTable); this.subscriberDatabase = subscriberDatabase; this.topicSubMap = makeSubMap(); // this is only necessary so that messageStoreStatistics can be set if // necessary We need the original reference since messageTable is wrapped // in a synchronized map in the parent class this.originalMessageTable = messageTable; }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { TopicMessageStore rc = topics.get(destination); if (rc == null) { rc = new MemoryTopicMessageStore(destination); if (transactionStore != null) { rc = transactionStore.proxy(rc); } topics.put(destination, rc); } return rc; }
public MemoryTopicMessageStore(ActiveMQDestination destination) { this(destination, new MemoryTopicMessageStoreLRUCache(100, 100, 0.75f, false), makeSubscriptionInfoMap()); // Set the messageStoreStatistics after the super class is initialized // so that the stats can be properly updated on cache eviction MemoryTopicMessageStoreLRUCache cache = (MemoryTopicMessageStoreLRUCache) originalMessageTable; cache.setMessageStoreStatistics(messageStoreStatistics); }
public MemoryTopicMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable, Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase) { super(destination, messageTable); this.subscriberDatabase = subscriberDatabase; this.topicSubMap = makeSubMap(); }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { TopicMessageStore rc = topics.get(destination); if (rc == null) { rc = new MemoryTopicMessageStore(destination); if (transactionStore != null) { rc = transactionStore.proxy(rc); } topics.put(destination, rc); } return rc; }
public MemoryTopicMessageStore(ActiveMQDestination destination) { this(destination, new MemoryTopicMessageStoreLRUCache(100, 100, 0.75f, false), makeSubscriptionInfoMap()); // Set the messageStoreStatistics after the super class is initialized // so that the stats can be properly updated on cache eviction MemoryTopicMessageStoreLRUCache cache = (MemoryTopicMessageStoreLRUCache) originalMessageTable; cache.setMessageStoreStatistics(messageStoreStatistics); }