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 void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { MemoryTransactionStore.this.acknowledge((TopicMessageStore) getDelegate(), clientId, subscriptionName, messageId, ack); } };
@Override public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException { MemoryTransactionStore.this.removeMessage(getDelegate(), ack); } };
@Override public void addMessage(ConnectionContext context, final Message send, boolean canOptimize) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), send); }
@Override public void addMessage(ConnectionContext context, final Message send) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), send); }
@Override public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException { MessageStore rc = queues.get(destination); if (rc == null) { rc = new MemoryMessageStore(destination); if (transactionStore != null) { rc = transactionStore.proxy(rc); } queues.put(destination, rc); } return rc; }
@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; }
@Override public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException { MemoryTransactionStore.this.removeMessage(getDelegate(), ack); }
public CommitAddOutcome(AddMessageCommand addMessageCommand) { this((JDBCMessageStore)addMessageCommand.getMessageStore(), addMessageCommand.getMessage()); }
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 void setCreateTransactionStore(boolean create) throws IOException { if (create) { createTransactionStore(); } }
@Override public TransactionStore createTransactionStore() throws IOException { if (transactionStore == null) { transactionStore = new MemoryTransactionStore(this); } return transactionStore; }
@Override public void addMessage(ConnectionContext context, final Message send) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), send); }
@Override public void addMessage(ConnectionContext context, final Message send, boolean canOptimize) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), send); }
@Override public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException { MemoryTransactionStore.this.removeMessage(getDelegate(), ack); }
@Override public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException { MemoryTransactionStore.this.removeMessage(getDelegate(), ack); }
@Override public ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); }
@Override public ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); }
@Override public ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message, boolean canoptimize) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); }
@Override public ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimize) throws IOException { MemoryTransactionStore.this.addMessage(context, getDelegate(), message); return new InlineListenableFuture(); }