@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException { JournalTopicMessageStore store = topics.get(destinationName); if (store == null) { TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName); store = new JournalTopicMessageStore(this, checkpointStore, destinationName); topics.put(destinationName, store); } return store; }
@Override public SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException { return persistenceAdapter.createTopicMessageStore(topic).getAllSubscriptions(); } }
private MessageStore findMessageStore(ActiveMQDestination destination) { ProxyMessageStore proxyMessageStore = null; try { if (destination.isQueue()) { proxyMessageStore = (ProxyMessageStore) persistenceAdapter.createQueueMessageStore((ActiveMQQueue) destination); } else { proxyMessageStore = (ProxyMessageStore) persistenceAdapter.createTopicMessageStore((ActiveMQTopic) destination); } } catch (IOException error) { throw new RuntimeException("Failed to find/create message store for destination: " + destination, error); } return proxyMessageStore.getDelegate(); }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { PersistenceAdapter persistenceAdapter = getMatchingPersistenceAdapter(destination); return transactionStore.proxy(persistenceAdapter.createTransactionStore(), persistenceAdapter.createTopicMessageStore(destination)); }
/** * Searches the set of subscriptions from the given persistence adapter and returns all those * that belong to the given ClientId value. * * @param adapter * the persistence adapter instance to search within. * @param clientId * the client ID value used to filter the subscription set. * * @return a list of all subscriptions belonging to the given client. * * @throws IOException if an error occurs while listing the stored subscriptions. */ static public List<SubscriptionInfo> listSubscriptions(PersistenceAdapter adapter, String clientId) throws IOException { ArrayList<SubscriptionInfo> rc = new ArrayList<SubscriptionInfo>(); for (ActiveMQDestination destination : adapter.getDestinations()) { if (destination.isTopic()) { TopicMessageStore store = adapter.createTopicMessageStore((ActiveMQTopic) destination); for (SubscriptionInfo sub : store.getAllSubscriptions()) { if (clientId == sub.getClientId() || clientId.equals(sub.getClientId())) { rc.add(sub); } } } } return rc; }
TopicMessageStore store = null; if (!AdvisorySupport.isAdvisoryTopic(destination)) { store = persistenceAdapter.createTopicMessageStore((ActiveMQTopic)destination);
@Override public SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException { return persistenceAdapter.createTopicMessageStore(topic).getAllSubscriptions(); } }
@Override public SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException { return persistenceAdapter.createTopicMessageStore(topic).getAllSubscriptions(); } }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException { JournalTopicMessageStore store = topics.get(destinationName); if (store == null) { TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName); store = new JournalTopicMessageStore(this, checkpointStore, destinationName); topics.put(destinationName, store); } return store; }
@Override public SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException { return persistenceAdapter.createTopicMessageStore(topic).getAllSubscriptions(); } }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException { JournalTopicMessageStore store = topics.get(destinationName); if (store == null) { TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName); store = new JournalTopicMessageStore(this, checkpointStore, destinationName); topics.put(destinationName, store); } return store; }
@Override public SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException { return persistenceAdapter.createTopicMessageStore(topic).getAllSubscriptions(); } }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException { JournalTopicMessageStore store = topics.get(destinationName); if (store == null) { TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName); store = new JournalTopicMessageStore(this, checkpointStore, destinationName); topics.put(destinationName, store); } return store; }
public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException { JournalTopicMessageStore store = topics.get(destinationName); if (store == null) { TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName); store = new JournalTopicMessageStore(this, checkpointStore, destinationName); topics.put(destinationName, store); } return store; }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { PersistenceAdapter persistenceAdapter = getMatchingPersistenceAdapter(destination); return transactionStore.proxy(persistenceAdapter.createTransactionStore(), persistenceAdapter.createTopicMessageStore(destination)); }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { PersistenceAdapter persistenceAdapter = getMatchingPersistenceAdapter(destination); return transactionStore.proxy(persistenceAdapter.createTransactionStore(), persistenceAdapter.createTopicMessageStore(destination)); }
@Override public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException { PersistenceAdapter persistenceAdapter = getMatchingPersistenceAdapter(destination); return transactionStore.proxy(persistenceAdapter.createTransactionStore(), persistenceAdapter.createTopicMessageStore(destination)); }
/** * Searches the set of subscriptions from the given persistence adapter and returns all those * that belong to the given ClientId value. * * @param adapter * the persistence adapter instance to search within. * @param clientId * the client ID value used to filter the subscription set. * * @return a list of all subscriptions belonging to the given client. * * @throws IOException if an error occurs while listing the stored subscriptions. */ static public List<SubscriptionInfo> listSubscriptions(PersistenceAdapter adapter, String clientId) throws IOException { ArrayList<SubscriptionInfo> rc = new ArrayList<SubscriptionInfo>(); for (ActiveMQDestination destination : adapter.getDestinations()) { if (destination.isTopic()) { TopicMessageStore store = adapter.createTopicMessageStore((ActiveMQTopic) destination); for (SubscriptionInfo sub : store.getAllSubscriptions()) { if (clientId == sub.getClientId() || clientId.equals(sub.getClientId())) { rc.add(sub); } } } } return rc; }
/** * Searches the set of subscriptions from the given persistence adapter and returns all those * that belong to the given ClientId value. * * @param adapter * the persistence adapter instance to search within. * @param clientId * the client ID value used to filter the subscription set. * * @return a list of all subscriptions belonging to the given client. * * @throws IOException if an error occurs while listing the stored subscriptions. */ static public List<SubscriptionInfo> listSubscriptions(PersistenceAdapter adapter, String clientId) throws IOException { ArrayList<SubscriptionInfo> rc = new ArrayList<SubscriptionInfo>(); for (ActiveMQDestination destination : adapter.getDestinations()) { if (destination.isTopic()) { TopicMessageStore store = adapter.createTopicMessageStore((ActiveMQTopic) destination); for (SubscriptionInfo sub : store.getAllSubscriptions()) { if (clientId == sub.getClientId() || clientId.equals(sub.getClientId())) { rc.add(sub); } } } } return rc; }
/** * Searches the set of subscriptions from the given persistence adapter and returns all those * that belong to the given ClientId value. * * @param adapter * the persistence adapter instance to search within. * @param clientId * the client ID value used to filter the subscription set. * * @return a list of all subscriptions belonging to the given client. * * @throws IOException if an error occurs while listing the stored subscriptions. */ static public List<SubscriptionInfo> listSubscriptions(PersistenceAdapter adapter, String clientId) throws IOException { ArrayList<SubscriptionInfo> rc = new ArrayList<SubscriptionInfo>(); for (ActiveMQDestination destination : adapter.getDestinations()) { if (destination.isTopic()) { TopicMessageStore store = adapter.createTopicMessageStore((ActiveMQTopic) destination); for (SubscriptionInfo sub : store.getAllSubscriptions()) { if (clientId == sub.getClientId() || clientId.equals(sub.getClientId())) { rc.add(sub); } } } } return rc; }