Package org.hornetq.core.journal.impl

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


      if (config.getJournalType() == JournalType.ASYNCIO)
      {
         HornetQLogger.LOGGER.journalUseAIO();

         journalFF = new AIOSequentialFileFactory(journalDir,
                                                  config.getJournalBufferSize_AIO(),
                                                  config.getJournalBufferTimeout_AIO(),
                                                  config.isLogJournalWriteRate(),
                                                  criticalErrorListener);
      }
View Full Code Here


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

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

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

      if (config.getJournalType() == JournalType.ASYNCIO)
      {
         HornetQServerLogger.LOGGER.journalUseAIO();

         journalFF = new AIOSequentialFileFactory(journalDir,
                                                  config.getJournalBufferSize_AIO(),
                                                  config.getJournalBufferTimeout_AIO(),
                                                  config.isLogJournalWriteRate(),
                                                  criticalErrorListener);
      }
View Full Code Here

      if (config.getJournalType() == JournalType.ASYNCIO)
      {
         HornetQServerLogger.LOGGER.journalUseAIO();

         journalFF = new AIOSequentialFileFactory(journalDir,
                                                  config.getJournalBufferSize_AIO(),
                                                  config.getJournalBufferTimeout_AIO(),
                                                  config.isLogJournalWriteRate(),
                                                  criticalErrorListener);
      }
View Full Code Here

      if (config.getJournalType() == JournalType.ASYNCIO)
      {
         HornetQServerLogger.LOGGER.journalUseAIO();

         journalFF = new AIOSequentialFileFactory(journalDir,
            config.getJournalBufferSize_AIO(),
            config.getJournalBufferTimeout_AIO(),
            config.isLogJournalWriteRate(),
            criticalErrorListener);
      }
View Full Code Here

   public void testCleanOnAIO()
   {
      if (AsynchronousFileImpl.isLoaded())
      {
         SequentialFileFactory factory = new AIOSequentialFileFactory("Whatever");

         testBuffer(factory);
      }
   }
View Full Code Here

   // Public --------------------------------------------------------

   public void testInsertAndLoad() throws Exception
   {

      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDir());
      JournalImpl impl = new JournalImpl(10 * 1024 * 1024,
                                         AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                                         0,
                                         0,
                                         factory,
                                         "hq",
                                         "hq",
                                         1000);

      impl.start();

      impl.load(AddAndRemoveStressTest.dummyLoader);

      for (long i = 1; i <= AddAndRemoveStressTest.NUMBER_OF_MESSAGES; i++)
      {
         if (i % 10000 == 0)
         {
            System.out.println("Append " + i);
         }
         impl.appendAddRecord(i, (byte)0, new SimpleEncoding(1024, (byte)'f'), false);
      }

      impl.stop();

      factory = new AIOSequentialFileFactory(getTestDir());
      impl = new JournalImpl(10 * 1024 * 1024,
                             AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                             0,
                             0,
                             factory,
                             "hq",
                             "hq",
                             1000);

      impl.start();

      impl.load(AddAndRemoveStressTest.dummyLoader);

      for (long i = 1; i <= AddAndRemoveStressTest.NUMBER_OF_MESSAGES; i++)
      {
         if (i % 10000 == 0)
         {
            System.out.println("Delete " + i);
         }

         impl.appendDeleteRecord(i, false);
      }

      impl.stop();

      factory = new AIOSequentialFileFactory(getTestDir());
      impl = new JournalImpl(10 * 1024 * 1024,
                             AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                             0,
                             0,
                             factory,
View Full Code Here

   }

   public void testInsertUpdateAndLoad() throws Exception
   {

      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDir());
      JournalImpl impl = new JournalImpl(10 * 1024 * 1024,
                                         AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                                         0,
                                         0,
                                         factory,
                                         "hq",
                                         "hq",
                                         1000);

      impl.start();

      impl.load(AddAndRemoveStressTest.dummyLoader);

      for (long i = 1; i <= AddAndRemoveStressTest.NUMBER_OF_MESSAGES; i++)
      {
         if (i % 10000 == 0)
         {
            System.out.println("Append " + i);
         }
         impl.appendAddRecord(i, (byte)21, new SimpleEncoding(40, (byte)'f'), false);
         impl.appendUpdateRecord(i, (byte)22, new SimpleEncoding(40, (byte)'g'), false);
      }

      impl.stop();

      factory = new AIOSequentialFileFactory(getTestDir());
      impl = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, factory, "hq", "hq", 1000);

      impl.start();

      impl.load(AddAndRemoveStressTest.dummyLoader);

      for (long i = 1; i <= AddAndRemoveStressTest.NUMBER_OF_MESSAGES; i++)
      {
         if (i % 10000 == 0)
         {
            System.out.println("Delete " + i);
         }

         impl.appendDeleteRecord(i, false);
      }

      impl.stop();

      factory = new AIOSequentialFileFactory(getTestDir());
      impl = new JournalImpl(10 * 1024 * 1024,
                             AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                             0,
                             0,
                             factory,
View Full Code Here

TOP

Related Classes of org.hornetq.core.journal.impl.AIOSequentialFileFactory

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.