Package org.apache.activemq.store

Examples of org.apache.activemq.store.MessageStore


    public static MemoryPersistenceAdapter newInstance(File file) {
        return new MemoryPersistenceAdapter();
    }

    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);
            }
View Full Code Here


    protected MemoryMessageStore asMemoryMessageStore(Object value) {
        if (value instanceof MemoryMessageStore) {
            return (MemoryMessageStore)value;
        }
        if (value instanceof ProxyMessageStore) {
            MessageStore delegate = ((ProxyMessageStore)value).getDelegate();
            if (delegate instanceof MemoryMessageStore) {
                return (MemoryMessageStore) delegate;
            }
        }
        LOG.warn("Expected an instance of MemoryMessageStore but was: " + value);
View Full Code Here

    }

    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        JournalMessageStore store = queues.get(destination);
        if (store == null) {
            MessageStore checkpointStore = longTermPersistence.createQueueMessageStore(destination);
            store = new JournalMessageStore(this, checkpointStore, destination);
            queues.put(destination, store);
        }
        return store;
    }
View Full Code Here

        }
        return rc;
    }

    public synchronized MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException{
        MessageStore rc=(MessageStore)queues.get(destination);
        if(rc==null){
            rc=new KahaMessageStore(getMapContainer(destination,"queue-data"),destination);
            messageStores.put(destination,rc);
            if(transactionStore!=null){
                rc=transactionStore.proxy(rc);
View Full Code Here

        }
        return rc;
    }

    protected MessageStore retrieveMessageStore(Object id){
        MessageStore result=(MessageStore)messageStores.get(id);
        return result;
    }
View Full Code Here

     * @throws IOException
     */
    void commit(KahaTransactionStore transactionStore) throws IOException{
        for(int i=0;i<list.size();i++){
            TxCommand command=(TxCommand) list.get(i);
            MessageStore ms=transactionStore.getStoreById(command.getMessageStoreKey());
            if(command.isAdd()){
                ms.addMessage(null,(Message) command.getCommand());
            }
        }
        for(int i=0;i<list.size();i++){
            TxCommand command=(TxCommand) list.get(i);
            MessageStore ms=transactionStore.getStoreById(command.getMessageStoreKey());
            if(command.isRemove()){
                ms.removeMessage(null,(MessageAck) command.getCommand());
            }
        }
    }
View Full Code Here

            }
        }
    }

    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        MessageStore rc = new JDBCMessageStore(this, getAdapter(), wireFormat, destination);
        if (transactionStore != null) {
            rc = transactionStore.proxy(rc);
        }
        return rc;
    }
View Full Code Here

    }

    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        JournalMessageStore store = (JournalMessageStore) queues.get(destination);
        if (store == null) {
            MessageStore checkpointStore = longTermPersistence.createQueueMessageStore(destination);
            store = new JournalMessageStore(this, checkpointStore, destination);
            queues.put(destination, store);
        }
        return store;
    }
View Full Code Here

    public static MemoryPersistenceAdapter newInstance(File file) {
        return new MemoryPersistenceAdapter();
    }
   
    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        MessageStore rc = (MessageStore)queues.get(destination);
        if(rc==null) {
            rc = new MemoryMessageStore(destination);
            if( transactionStore !=null ) {
                rc = transactionStore.proxy(rc);
            }
View Full Code Here

    }

    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        QuickJournalMessageStore store = (QuickJournalMessageStore) queues.get(destination);
        if (store == null) {
            MessageStore checkpointStore = longTermPersistence.createQueueMessageStore(destination);
            store = new QuickJournalMessageStore(this, checkpointStore, destination);
            queues.put(destination, store);
        }
        return store;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.store.MessageStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.