Package org.apache.activemq.leveldb

Examples of org.apache.activemq.leveldb.LevelDBStore


    @Override
    protected void setUp() throws Exception {
        // Start an embedded broker up.
        brokerService = new BrokerService();
        LevelDBStore adaptor = new LevelDBStore();
        brokerService.setPersistenceAdapter(adaptor);
        brokerService.deleteAllMessages();

        // A small max page size makes this issue occur faster.
        PolicyMap policyMap = new PolicyMap();
View Full Code Here


public class ThreeBrokerVirtualTopicNetworkLevelDBTest extends ThreeBrokerVirtualTopicNetworkTest {
   
     protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
        File dataFileDir = new File("target/test-data/leveldb/" + broker.getBrokerName());
        LevelDBStore adapter = new LevelDBStore();
        adapter.setDirectory(dataFileDir);
        broker.setPersistenceAdapter(adapter);
    }
View Full Code Here

            File amqData = new File("activemq-data/" + getName() + "-leveldb");
            if (deleteAllMessages)
                delete(amqData);

            broker.setPersistent(true);
            LevelDBStore amq = new LevelDBStore();
            amq.setDirectory(amqData);
            broker.setPersistenceAdapter(amq);
            break;

        case KAHADB:
            File kahadbData = new File("activemq-data/" + getName() + "-kahadb");
View Full Code Here

public class SingleBrokerVirtualDestinationsWithWildcardLevelDBTest extends SingleBrokerVirtualDestinationsWithWildcardTest {

    @Override
    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
        File dataFileDir = new File("target/test-amq-data/leveldb/" + broker.getBrokerName());
        LevelDBStore kaha = new LevelDBStore();
        kaha.setDirectory(dataFileDir);
        broker.setPersistenceAdapter(kaha);
    }
View Full Code Here

*/
public class LevelDBDurableSubscriptionTest extends DurableSubscriptionTestSupport {

    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
        File dataDir = new File("target/test-data/durableLevelDB");
        LevelDBStore adaptor = new LevelDBStore();
        adaptor.setDirectory(dataDir);
        return adaptor;
    }
View Full Code Here

    private void startBroker() throws Exception {
        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
        broker.setKeepDurableSubsActive(false);
        broker.setPersistent(true);
        LevelDBStore persistenceAdapter = new LevelDBStore();
        persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
        broker.setPersistenceAdapter(persistenceAdapter);
        broker.setUseJmx(true);
        broker.getManagementContext().setCreateConnector(false);
        broker.setBrokerName(getName());
        broker.start();
View Full Code Here

public class LevelDBNegativeQueueTest extends NegativeQueueTest {

    @Override
    protected void configureBroker(BrokerService answer) throws Exception {
        super.configureBroker(answer);
        LevelDBStore levelDBStore = new LevelDBStore();
        File directory = new File("target/activemq-data/leveldb");
        IOHelper.deleteChildren(directory);
        levelDBStore.setDirectory(directory);
        levelDBStore.deleteAllMessages();
        answer.setPersistenceAdapter(levelDBStore);
    }
View Full Code Here

public class AMQ2149LevelDBTest extends AMQ2149Test {

    @Override
    protected void configurePersistenceAdapter(BrokerService brokerService) throws Exception {
        LevelDBStore persistenceFactory = new LevelDBStore();
        persistenceFactory.setDirectory(dataDirFile);
        brokerService.setPersistenceAdapter(persistenceFactory);
    }
View Full Code Here

        brokerService.setUseJmx(true);
        brokerService.setAdvisorySupport(false);
        brokerService.setDeleteAllMessagesOnStartup(true);
        brokerService.setDataDirectoryFile(dataDirFile);

        LevelDBStore persistenceFactory = new LevelDBStore();
        persistenceFactory.setDirectory(dataDirFile);
        brokerService.setPersistenceAdapter(persistenceFactory);
        brokerService.start();
        brokerService.waitUntilStarted();
    }
View Full Code Here

     * result=factory.getBroker(); result.start(); return result; }
     */

    @Override
    protected void configureBroker(BrokerService answer,String uri) throws Exception {
        LevelDBStore store = new LevelDBStore();
        answer.setPersistenceAdapter(store);
        answer.setDeleteAllMessagesOnStartup(true);
        answer.addConnector(uri);
      
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.leveldb.LevelDBStore

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.