ActiveMQDestination convert(String dest) { int p = dest.indexOf(":"); if (p < 0) { throw new IllegalArgumentException("Not in the valid destination format"); } int type = Integer.parseInt(dest.substring(0, p)); String name = dest.substring(p + 1); return convert(type, name); }
public KahaDBMessageStore(ActiveMQDestination destination) { super(destination); this.dest = convert(destination); this.maxAsyncJobs = getMaxAsyncJobs(); this.localDestinationSemaphore = new Semaphore(this.maxAsyncJobs); }
@Override public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final MessageStore queueStore = this.transactionStore.proxy(new KahaDBMessageStore(destination)); store = storeCache.putIfAbsent(key, queueStore); if (store == null) { store = queueStore; } } return store; }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final TopicMessageStore topicStore = this.transactionStore.proxy(new KahaDBTopicMessageStore(destination)); store = storeCache.putIfAbsent(key, topicStore); if (store == null) { store = topicStore; } } return (TopicMessageStore) store; }
private KahaDBMessageStore findMatchingStore(ActiveMQDestination activeMQDestination) throws IOException { ProxyMessageStore store = (ProxyMessageStore) storeCache.get(convert(activeMQDestination)); if (store == null) { if (activeMQDestination.isQueue()) { store = (ProxyMessageStore) createQueueMessageStore((ActiveMQQueue) activeMQDestination); } else { store = (ProxyMessageStore) createTopicMessageStore((ActiveMQTopic) activeMQDestination); } } return (KahaDBMessageStore) store.getDelegate(); }
private ActiveMQDestination convert(KahaDestination commandDestination) { return convert(commandDestination.getType().getNumber(), commandDestination.getName()); }
ActiveMQDestination convert(String dest) { int p = dest.indexOf(":"); if (p < 0) { throw new IllegalArgumentException("Not in the valid destination format"); } int type = Integer.parseInt(dest.substring(0, p)); String name = dest.substring(p + 1); return convert(type, name); }
ActiveMQDestination convert(String dest) { int p = dest.indexOf(":"); if (p < 0) { throw new IllegalArgumentException("Not in the valid destination format"); } int type = Integer.parseInt(dest.substring(0, p)); String name = dest.substring(p + 1); return convert(type, name); }
ActiveMQDestination convert(String dest) { int p = dest.indexOf(":"); if (p < 0) { throw new IllegalArgumentException("Not in the valid destination format"); } int type = Integer.parseInt(dest.substring(0, p)); String name = dest.substring(p + 1); return convert(type, name); }
public KahaDBMessageStore(ActiveMQDestination destination) { super(destination); this.dest = convert(destination); this.maxAsyncJobs = getMaxAsyncJobs(); this.localDestinationSemaphore = new Semaphore(this.maxAsyncJobs); }
public KahaDBMessageStore(ActiveMQDestination destination) { super(destination); this.dest = convert(destination); this.maxAsyncJobs = getMaxAsyncJobs(); this.localDestinationSemaphore = new Semaphore(this.maxAsyncJobs); }
public KahaDBMessageStore(ActiveMQDestination destination) { super(destination); this.dest = convert(destination); this.maxAsyncJobs = getMaxAsyncJobs(); this.localDestinationSemaphore = new Semaphore(this.maxAsyncJobs); }
public KahaDBMessageStore(ActiveMQDestination destination) { super(destination); this.dest = convert(destination); this.maxAsyncJobs = getMaxAsyncJobs(); this.localDestinationSemaphore = new Semaphore(this.maxAsyncJobs); }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final TopicMessageStore topicStore = this.transactionStore.proxy(new KahaDBTopicMessageStore(destination)); store = storeCache.putIfAbsent(key, topicStore); if (store == null) { store = topicStore; } } return (TopicMessageStore) store; }
@Override public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final MessageStore queueStore = this.transactionStore.proxy(new KahaDBMessageStore(destination)); store = storeCache.putIfAbsent(key, queueStore); if (store == null) { store = queueStore; } } return store; }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final TopicMessageStore topicStore = this.transactionStore.proxy(new KahaDBTopicMessageStore(destination)); store = storeCache.putIfAbsent(key, topicStore); if (store == null) { store = topicStore; } } return (TopicMessageStore) store; }
@Override public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final MessageStore queueStore = this.transactionStore.proxy(new KahaDBMessageStore(destination)); store = storeCache.putIfAbsent(key, queueStore); if (store == null) { store = queueStore; } } return store; }
@Override public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final MessageStore queueStore = this.transactionStore.proxy(new KahaDBMessageStore(destination)); store = storeCache.putIfAbsent(key, queueStore); if (store == null) { store = queueStore; } } return store; }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { String key = key(convert(destination)); MessageStore store = storeCache.get(key(convert(destination))); if (store == null) { final TopicMessageStore topicStore = this.transactionStore.proxy(new KahaDBTopicMessageStore(destination)); store = storeCache.putIfAbsent(key, topicStore); if (store == null) { store = topicStore; } } return (TopicMessageStore) store; }
private ActiveMQDestination convert(KahaDestination commandDestination) { return convert(commandDestination.getType().getNumber(), commandDestination.getName()); }