Package org.apache.activeio.journal.active

Examples of org.apache.activeio.journal.active.JournalImpl


     * @throws IOException
     */
    protected void createJournal() throws IOException {
        File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
        if (failIfJournalIsLocked) {
            journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                      getJournalArchiveDirectory());
        } else {
            while (true) {
                try {
                    journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                              getJournalArchiveDirectory());
                    break;
                } catch (JournalLockedException e) {
                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
                             + " seconds for the journal to be unlocked.");
View Full Code Here


     * @throws IOException
     */
    protected void createJournal() throws IOException {
        File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
        if (failIfJournalIsLocked) {
            journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                      getJournalArchiveDirectory());
        } else {
            while (true) {
                try {
                    journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                              getJournalArchiveDirectory());
                    break;
                } catch (JournalLockedException e) {
                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
                             + " seconds for the journal to be unlocked.");
View Full Code Here

     * @throws IOException
     */
    protected void createJournal() throws IOException {
        File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
        if (failIfJournalIsLocked) {
            journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                      getJournalArchiveDirectory());
        } else {
            while (true) {
                try {
                    journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                              getJournalArchiveDirectory());
                    break;
                } catch (JournalLockedException e) {
                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
                             + " seconds for the journal to be unlocked.");
View Full Code Here

    protected void configureBroker(BrokerService answer,String uri) throws Exception {

        File dataFileDir = new File("target/test-amq-data/perfTest");
        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);

        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
        journalAdaptor.setMaxCheckpointWorkers(1);

View Full Code Here

     * @throws IOException
     */
    protected void createJournal() throws IOException {
        File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
        if( failIfJournalIsLocked ) {
            journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize, getJournalArchiveDirectory());
        } else {
            while( true ) {
                try {
                    journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize, getJournalArchiveDirectory());
                    break;
                } catch (JournalLockedException e) {
                    log.info("Journal is locked... waiting "+(JOURNAL_LOCKED_WAIT_DELAY/1000)+" seconds for the journal to be unlocked.");
                    try {
                        Thread.sleep(JOURNAL_LOCKED_WAIT_DELAY);
View Full Code Here

     * @throws IOException
     */
    protected void createJournal() throws IOException {
        File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
        if (failIfJournalIsLocked) {
            journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                      getJournalArchiveDirectory());
        } else {
            while (true) {
                try {
                    journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
                                              getJournalArchiveDirectory());
                    break;
                } catch (JournalLockedException e) {
                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
                             + " seconds for the journal to be unlocked.");
View Full Code Here

    protected void configureBroker(BrokerService answer,String uri) throws Exception {

        File dataFileDir = new File("target/test-amq-data/perfTest");
        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);

        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
        journalAdaptor.setMaxCheckpointWorkers(1);

View Full Code Here

    protected void configureBroker(BrokerService answer,String uri) throws Exception {

        File dataFileDir = new File("target/test-amq-data/perfTest");
        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);

        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
        journalAdaptor.setMaxCheckpointWorkers(1);

View Full Code Here

    protected BrokerService createBroker() throws Exception {
        BrokerService broker = super.createBroker();
       
        File dataFileDir = new File("target/activemq-data/StoreQueueCursorJournalNoDuplicateTest");
        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);

        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
        kahaAdaptor.setDirectory(dataFileDir);
        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, broker.getTaskRunnerFactory());
        journalAdaptor.setMaxCheckpointWorkers(1);
View Full Code Here

    protected void configureBroker(BrokerService answer) throws Exception {

        File dataFileDir = new File("target/test-amq-data/perfTest");
        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);

        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
        journalAdaptor.setMaxCheckpointWorkers(1);

View Full Code Here

TOP

Related Classes of org.apache.activeio.journal.active.JournalImpl

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.