Examples of JournalImpl


Examples of org.activeio.journal.active.JournalImpl

        if (s == null) {
            s = new File(MuleManager.getConfiguration().getWorkingDirectory() + File.separator
                    + MuleConfiguration.DEFAULT_QUEUE_STORE);
        }
        s.mkdirs();
        journal = new JournalImpl(s, 8, LogFileManager.DEFAULT_LOGFILE_SIZE);
        journal.setJournalEventListener(this);
        marks = new ConcurrentHashMap();
        pendingMarks = new TreeSet();
        unusedMarks = new TreeSet();
        marker = new Thread(this, "JournalPersistenceStrategy");
View Full Code Here

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

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

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

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

    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

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.");
                    try {
                        Thread.sleep(JOURNAL_LOCKED_WAIT_DELAY);
View Full Code Here

Examples of org.codehaus.activemq.journal.impl.JournalImpl


    // Implementation methods
//-------------------------------------------------------------------------
    private Journal createJournal() throws IOException {
        return new JournalImpl(directory);
    }
View Full Code Here

Examples of org.hornetq.core.journal.impl.JournalImpl

      journalDir = config.getJournalDirectory();

      SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir);

      Journal localBindings = new JournalImpl(1024 * 1024,
                                              2,
                                              config.getJournalCompactMinFiles(),
                                              config.getJournalCompactPercentage(),
                                              bindingsFF,
                                              "hornetq-bindings",
                                              "bindings",
                                              1);

      if (replicator != null)
      {
         bindingsJournal = new ReplicatedJournal((byte)0, localBindings, replicator);
      }
      else
      {
         bindingsJournal = localBindings;
      }

      if (journalDir == null)
      {
         throw new NullPointerException("journal-dir is null");
      }

      createJournalDir = config.isCreateJournalDir();

      syncNonTransactional = config.isJournalSyncNonTransactional();

      syncTransactional = config.isJournalSyncTransactional();

      SequentialFileFactory journalFF = null;

      if (config.getJournalType() == JournalType.ASYNCIO)
      {
         JournalStorageManager.log.info("Using AIO Journal");

         journalFF = new AIOSequentialFileFactory(journalDir,
                                                  config.getJournalBufferSize_AIO(),
                                                  config.getJournalBufferTimeout_AIO(),
                                                  config.isLogJournalWriteRate());
      }
      else if (config.getJournalType() == JournalType.NIO)
      {
         JournalStorageManager.log.info("Using NIO Journal");
         journalFF = new NIOSequentialFileFactory(journalDir,
                                                  true,
                                                  config.getJournalBufferSize_NIO(),
                                                  config.getJournalBufferTimeout_NIO(),
                                                  config.isLogJournalWriteRate());
      }
      else
      {
         throw new IllegalArgumentException("Unsupported journal type " + config.getJournalType());
      }

      if (config.isBackup() && !config.isSharedStore())
      {
         idGenerator = null;
      }
      else
      {
         idGenerator = new BatchingIDGenerator(0, JournalStorageManager.CHECKPOINT_BATCH_SIZE, bindingsJournal);
      }
      Journal localMessage = new JournalImpl(config.getJournalFileSize(),
                                             config.getJournalMinFiles(),
                                             config.getJournalCompactMinFiles(),
                                             config.getJournalCompactPercentage(),
                                             journalFF,
                                             "hornetq-data",
View Full Code Here

Examples of org.hornetq.core.journal.impl.JournalImpl

   public static void describeBindingJournal(final String bindingsDir) throws Exception
   {

      SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir);

      JournalImpl bindings = new JournalImpl(1024 * 1024, 2, -1, 0, bindingsFF, "hornetq-bindings", "bindings", 1);

      describeJournal(bindingsFF, bindings);
   }
View Full Code Here

Examples of org.hornetq.core.journal.impl.JournalImpl

      SequentialFileFactory messagesFF = new NIOSequentialFileFactory(messagesDir);

      // Will use only default values. The load function should adapt to anything different
      ConfigurationImpl defaultValues = new ConfigurationImpl();

      JournalImpl messagesJournal = new JournalImpl(defaultValues.getJournalFileSize(),
                                                    defaultValues.getJournalMinFiles(),
                                                    0,
                                                    0,
                                                    messagesFF,
                                                    "hornetq-data",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.