public boolean isConcurrentStoreAndDispatchTopics() { return letter.isConcurrentStoreAndDispatchTopics(); }
public KahaDBTopicMessageStore(ActiveMQTopic destination) throws IOException { super(destination); this.subscriptionCount.set(getAllSubscriptions().length); if (isConcurrentStoreAndDispatchTopics()) { asyncTopicMaps.add(asyncTaskMap); } }
@Override public ListenableFuture<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message) throws IOException { if (isConcurrentStoreAndDispatchTopics()) { message.beforeMarshall(wireFormat); StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get()); result.aquireLocks(); addTopicTask(this, result); return result.getFuture(); } else { return super.asyncAddTopicMessage(context, message); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { String subscriptionKey = subscriptionKey(clientId, subscriptionName).toString(); if (isConcurrentStoreAndDispatchTopics()) { AsyncJobKey key = new AsyncJobKey(messageId, getDestination()); StoreTopicTask task = null; synchronized (asyncTaskMap) { task = (StoreTopicTask) asyncTaskMap.get(key); } if (task != null) { if (task.addSubscriptionKey(subscriptionKey)) { removeTopicTask(this, messageId); if (task.cancel()) { synchronized (asyncTaskMap) { asyncTaskMap.remove(key); } } } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } }
public boolean isConcurrentStoreAndDispatchTopics() { return letter.isConcurrentStoreAndDispatchTopics(); }
public boolean isConcurrentStoreAndDispatchTopics() { return letter.isConcurrentStoreAndDispatchTopics(); }
public boolean isConcurrentStoreAndDispatchTopics() { return letter.isConcurrentStoreAndDispatchTopics(); }
public boolean isConcurrentStoreAndDispatchTopics() { return letter.isConcurrentStoreAndDispatchTopics(); }
public KahaDBTopicMessageStore(ActiveMQTopic destination) throws IOException { super(destination); this.subscriptionCount.set(getAllSubscriptions().length); if (isConcurrentStoreAndDispatchTopics()) { asyncTopicMaps.add(asyncTaskMap); } }
public KahaDBTopicMessageStore(ActiveMQTopic destination) throws IOException { super(destination); this.subscriptionCount.set(getAllSubscriptions().length); if (isConcurrentStoreAndDispatchTopics()) { asyncTopicMaps.add(asyncTaskMap); } }
public KahaDBTopicMessageStore(ActiveMQTopic destination) throws IOException { super(destination); this.subscriptionCount.set(getAllSubscriptions().length); if (isConcurrentStoreAndDispatchTopics()) { asyncTopicMaps.add(asyncTaskMap); } }
@Override public Future<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message) throws IOException { if (isConcurrentStoreAndDispatchTopics()) { StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get()); result.aquireLocks(); addTopicTask(this, result); return result.getFuture(); } else { return super.asyncAddTopicMessage(context, message); } }
@Override public ListenableFuture<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message) throws IOException { if (isConcurrentStoreAndDispatchTopics()) { message.beforeMarshall(wireFormat); StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get()); result.aquireLocks(); addTopicTask(this, result); return result.getFuture(); } else { return super.asyncAddTopicMessage(context, message); } }
@Override public ListenableFuture<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message) throws IOException { if (isConcurrentStoreAndDispatchTopics()) { message.beforeMarshall(wireFormat); StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get()); result.aquireLocks(); addTopicTask(this, result); return result.getFuture(); } else { return super.asyncAddTopicMessage(context, message); } }
@Override public ListenableFuture<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message) throws IOException { if (isConcurrentStoreAndDispatchTopics()) { message.beforeMarshall(wireFormat); StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get()); result.aquireLocks(); addTopicTask(this, result); return result.getFuture(); } else { return super.asyncAddTopicMessage(context, message); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { String subscriptionKey = subscriptionKey(clientId, subscriptionName).toString(); if (isConcurrentStoreAndDispatchTopics()) { AsyncJobKey key = new AsyncJobKey(messageId, getDestination()); StoreTopicTask task = null; synchronized (asyncTaskMap) { task = (StoreTopicTask) asyncTaskMap.get(key); } if (task != null) { if (task.addSubscriptionKey(subscriptionKey)) { removeTopicTask(this, messageId); if (task.cancel()) { synchronized (asyncTaskMap) { asyncTaskMap.remove(key); } } } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { String subscriptionKey = subscriptionKey(clientId, subscriptionName).toString(); if (isConcurrentStoreAndDispatchTopics()) { AsyncJobKey key = new AsyncJobKey(messageId, getDestination()); StoreTopicTask task = null; synchronized (asyncTaskMap) { task = (StoreTopicTask) asyncTaskMap.get(key); } if (task != null) { if (task.addSubscriptionKey(subscriptionKey)) { removeTopicTask(this, messageId); if (task.cancel()) { synchronized (asyncTaskMap) { asyncTaskMap.remove(key); } } } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { String subscriptionKey = subscriptionKey(clientId, subscriptionName).toString(); if (isConcurrentStoreAndDispatchTopics()) { AsyncJobKey key = new AsyncJobKey(messageId, getDestination()); StoreTopicTask task = null; synchronized (asyncTaskMap) { task = (StoreTopicTask) asyncTaskMap.get(key); } if (task != null) { if (task.addSubscriptionKey(subscriptionKey)) { removeTopicTask(this, messageId); if (task.cancel()) { synchronized (asyncTaskMap) { asyncTaskMap.remove(key); } } } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } }
public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { String subscriptionKey = subscriptionKey(clientId, subscriptionName); if (isConcurrentStoreAndDispatchTopics()) { AsyncJobKey key = new AsyncJobKey(messageId, getDestination()); StoreTopicTask task = null; synchronized (asyncTaskMap) { task = (StoreTopicTask) asyncTaskMap.get(key); } if (task != null) { if (task.addSubscriptionKey(subscriptionKey)) { removeTopicTask(this, messageId); if (task.cancel()) { synchronized (asyncTaskMap) { asyncTaskMap.remove(key); } } } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } } else { doAcknowledge(context, subscriptionKey, messageId, ack); } }