Package com.sleepycat.je

Examples of com.sleepycat.je.SecondaryConfig


        }
        return firstException;
    }

    protected SecondaryConfig createSecondaryConfig(SecondaryKeyCreator keyGenerator) {
        SecondaryConfig answer = new SecondaryConfig();
        answer.setKeyCreator(keyGenerator);
        answer.setAllowCreate(true);
        answer.setAllowPopulate(true);
        answer.setTransactional(true);
        return answer;
    }
View Full Code Here


    public MessageStore createQueueMessageStore(String destinationName) throws JMSException {
        try {
            Database database = createDatabase("Queue_" + destinationName);
            SequenceNumberCreator sequenceNumberCreator = new SequenceNumberCreator();
            SecondaryConfig secondaryConfig = createSecondaryConfig(sequenceNumberCreator);
            SecondaryDatabase secondaryDatabase = createSecondaryDatabase("Queue_Index_" + destinationName, database, secondaryConfig);
            sequenceNumberCreator.initialise(secondaryDatabase);
            return new BDbMessageStore(database, secondaryDatabase, secondaryConfig, sequenceNumberCreator, wireFormat.copy());
        }
        catch (DatabaseException e) {
View Full Code Here

    public TopicMessageStore createTopicMessageStore(String destinationName) throws JMSException {
        try {
            Database database = createDatabase("Topic_" + destinationName);
            SequenceNumberCreator sequenceNumberCreator = new SequenceNumberCreator();
            SecondaryConfig secondaryConfig = createSecondaryConfig(sequenceNumberCreator);
            SecondaryDatabase secondaryDatabase = createSecondaryDatabase("Topic_Index_" + destinationName, database, secondaryConfig);
            sequenceNumberCreator.initialise(secondaryDatabase);
            Database subscriptionDatabase = createDatabase("ConsumeAck_" + destinationName);
            return new BDbTopicMessageStore(database, secondaryDatabase, secondaryConfig, sequenceNumberCreator, wireFormat.copy(), subscriptionDatabase);
        }
View Full Code Here

        }
        return firstException;
    }

    protected SecondaryConfig createSecondaryConfig(SecondaryKeyCreator keyGenerator) {
        SecondaryConfig answer = new SecondaryConfig();
        answer.setKeyCreator(keyGenerator);
        answer.setAllowCreate(true);
        answer.setAllowPopulate(true);
        answer.setTransactional(true);
        return answer;
    }
View Full Code Here

        // Open the database. Create it if it does not already exist.
        this.ownerDirectory = env.openDatabase(null, "ownerDirecotry",
                new DatabaseConfig().setAllowCreate(true).setTransactional(true));

        this.ownerIndex = env.openSecondaryDatabase(null, "ownerIndex", ownerDirectory,
                ((SecondaryConfig) (new SecondaryConfig().setAllowCreate(true).setSortedDuplicates(true).setTransactional(true))).setAllowPopulate(true).setKeyCreator(new OwnerKeyCreator()));

        this.mainStore = env.openDatabase(null, "mainStore",
                new DatabaseConfig().setAllowCreate(true).setTransactional(true));

        this.allocationDirectory = env.openDatabase(null, "allocationDirectory",
View Full Code Here

        // Open the database. Create it if it does not already exist.
        this.ownerDirectory = env.openDatabase(null, "ownerDirecotry",
                new DatabaseConfig().setAllowCreate(true).setTransactional(true));

        this.ownerIndex = env.openSecondaryDatabase(null, "ownerIndex", ownerDirectory,
                ((SecondaryConfig) (new SecondaryConfig().setAllowCreate(true).setSortedDuplicates(true).setTransactional(true))).setAllowPopulate(true).setKeyCreator(new OwnerKeyCreator()));

        PreloadConfig ownerDirectoryPreloadConfig = new PreloadConfig();
        this.ownerDirectory.preload(ownerDirectoryPreloadConfig);

        this.mainStore = env.openDatabase(null, "mainStore",
View Full Code Here

    public MessageStore createQueueMessageStore(String destinationName) throws JMSException {
        try {
            Database database = createDatabase("Queue_" + destinationName);
            SequenceNumberCreator sequenceNumberCreator = new SequenceNumberCreator();
            SecondaryConfig secondaryConfig = createSecondaryConfig(sequenceNumberCreator);
            SecondaryDatabase secondaryDatabase = createSecondaryDatabase("Queue_Index_" + destinationName, database, secondaryConfig);
            sequenceNumberCreator.initialise(secondaryDatabase);
            return transactionStore.proxy(new BDbMessageStore(database, secondaryDatabase, secondaryConfig, sequenceNumberCreator, wireFormat.copy()));
        }
        catch (DatabaseException e) {
View Full Code Here

    public TopicMessageStore createTopicMessageStore(String destinationName) throws JMSException {
        try {
            Database database = createDatabase("Topic_" + destinationName);
            SequenceNumberCreator sequenceNumberCreator = new SequenceNumberCreator();
            SecondaryConfig secondaryConfig = createSecondaryConfig(sequenceNumberCreator);
            SecondaryDatabase secondaryDatabase = createSecondaryDatabase("Topic_Index_" + destinationName, database, secondaryConfig);
            sequenceNumberCreator.initialise(secondaryDatabase);
            Database subscriptionDatabase = createDatabase("ConsumeAck_" + destinationName);
            return transactionStore.proxy(new BDbTopicMessageStore(database, secondaryDatabase, secondaryConfig, sequenceNumberCreator, wireFormat.copy(), subscriptionDatabase));
        }
View Full Code Here

        }
        return firstException;
    }

    protected SecondaryConfig createSecondaryConfig(SecondaryKeyCreator keyGenerator) {
        SecondaryConfig answer = new SecondaryConfig();
        answer.setKeyCreator(keyGenerator);
        answer.setAllowCreate(true);
        answer.setAllowPopulate(true);
        answer.setTransactional(true);
        return answer;
    }
View Full Code Here

    public MessageStore createQueueMessageStore(String destinationName) throws JMSException {
        try {
            Database database = createDatabase("Queue_" + destinationName);
            SequenceNumberCreator sequenceNumberCreator = new SequenceNumberCreator();
            SecondaryConfig secondaryConfig = createSecondaryConfig(sequenceNumberCreator);
            SecondaryDatabase secondaryDatabase = createSecondaryDatabase("Queue_Index_" + destinationName, database, secondaryConfig);
            sequenceNumberCreator.initialise(secondaryDatabase);
            return new BDbMessageStore(database, secondaryDatabase, secondaryConfig, sequenceNumberCreator, wireFormat.copy());
        }
        catch (DatabaseException e) {
View Full Code Here

TOP

Related Classes of com.sleepycat.je.SecondaryConfig

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.