Package org.hornetq.core.persistence.impl.journal

Examples of org.hornetq.core.persistence.impl.journal.JournalStorageManager$TXLargeMessageConfirmationOperation


    */
   protected StorageManager createStorageManager()
   {
      if (configuration.isPersistenceEnabled())
      {
         return new JournalStorageManager(configuration, executorFactory, replicationManager);
      }
      else
      {
         return new NullStorageManager();
      }
View Full Code Here


    */
   private StorageManager createStorageManager()
   {
      if (configuration.isPersistenceEnabled())
      {
         return new JournalStorageManager(configuration, executorFactory, shutdownOnCriticalIO);
      }
      return new NullStorageManager();
   }
View Full Code Here

    */
   protected StorageManager createStorageManager()
   {
      if (configuration.isPersistenceEnabled())
      {
         return new JournalStorageManager(configuration, executorFactory, replicationManager, shutdownOnCriticalIO);
      }
      else
      {
         return new NullStorageManager();
      }
View Full Code Here

    */
   protected StorageManager createStorageManager()
   {
      if (configuration.isPersistenceEnabled())
      {
         return new JournalStorageManager(configuration, executorFactory, replicationManager);
      }
      else
      {
         return new NullStorageManager();
      }
View Full Code Here

         {
            return executor;
         }
      };

      storageManager = new JournalStorageManager(config, executorFactory);

      messageRefs = new HashMap<Long, HashMap<Long, ReferenceDescribe>>();

      messages = new HashMap<Long, Message>();
View Full Code Here

    */
   public void start() throws Exception
   {
      Configuration config = server.getConfiguration();

      storage = new JournalStorageManager(config, server.getExecutorFactory());
      storage.start();

      server.getManagementService().setStorageManager(storage);

      registerJournal((byte)1, storage.getMessageJournal());
View Full Code Here

    */
   public void start() throws Exception
   {
      Configuration config = server.getConfiguration();

      storage = new JournalStorageManager(config, server.getExecutorFactory(), criticalErrorListener);
      storage.start();

      server.getManagementService().setStorageManager(storage);

      registerJournal((byte)1, storage.getMessageJournal());
View Full Code Here

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

   public void testReloadDuplication() throws Exception
   {

      JournalStorageManager journal = null;

      try
      {
         clearData();

         SimpleString ADDRESS = new SimpleString("address");

         Configuration configuration = createDefaultConfig();

         PostOffice postOffice = new FakePostOffice();

         ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(ConfigurationImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);

         journal = new JournalStorageManager(configuration, factory);

         journal.start();
         journal.loadBindingJournal(new ArrayList<QueueBindingInfo>(), new ArrayList<GroupingInfo>());

         HashMap<SimpleString, List<Pair<byte[], Long>>> mapDups = new HashMap<SimpleString, List<Pair<byte[], Long>>>();

         journal.loadMessageJournal(postOffice,
                                    new FakePagingManager(),
                                    new ResourceManagerImpl(0, 0, scheduledThreadPool),
                                    new HashMap<Long, Queue>(),
                                    null,
                                    mapDups,
                                    null);

         Assert.assertEquals(0, mapDups.size());

         DuplicateIDCacheImpl cacheID = new DuplicateIDCacheImpl(ADDRESS, 10, journal, true);

         for (int i = 0; i < 100; i++)
         {
            cacheID.addToCache(RandomUtil.randomBytes(), null);
         }

         journal.stop();

         journal = new JournalStorageManager(configuration, factory);
         journal.start();
         journal.loadBindingJournal(new ArrayList<QueueBindingInfo>(), new ArrayList<GroupingInfo>());

         journal.loadMessageJournal(postOffice,
                                    new FakePagingManager(),
                                    new ResourceManagerImpl(0, 0, scheduledThreadPool),
                                    new HashMap<Long, Queue>(),
                                    null,
                                    mapDups,
                                    null);

         Assert.assertEquals(1, mapDups.size());

         List<Pair<byte[], Long>> values = mapDups.get(ADDRESS);

         Assert.assertEquals(10, values.size());

         cacheID = new DuplicateIDCacheImpl(ADDRESS, 10, journal, true);
         cacheID.load(values);

         for (int i = 0; i < 100; i++)
         {
            cacheID.addToCache(RandomUtil.randomBytes(), null);
         }

         journal.stop();

         mapDups.clear();

         journal = new JournalStorageManager(configuration, factory);
         journal.start();
         journal.loadBindingJournal(new ArrayList<QueueBindingInfo>(), new ArrayList<GroupingInfo>());

         journal.loadMessageJournal(postOffice,
                                    new FakePagingManager(),
                                    new ResourceManagerImpl(0, 0, scheduledThreadPool),
                                    new HashMap<Long, Queue>(),
                                    null,
                                    mapDups,
                                    null);

         Assert.assertEquals(1, mapDups.size());

         values = mapDups.get(ADDRESS);

         Assert.assertEquals(10, values.size());
      }
      finally
      {
         if (journal != null)
         {
            try
            {
               journal.stop();
            }
            catch (Throwable ignored)
            {
            }
         }
View Full Code Here

    */
   protected StorageManager createStorageManager()
   {
      if (configuration.isPersistenceEnabled())
      {
         return new JournalStorageManager(configuration, executorFactory, replicationManager, shutdownOnCriticalIO);
      }
      else
      {
         return new NullStorageManager();
      }
View Full Code Here

    */
   private StorageManager createStorageManager()
   {
      if (configuration.isPersistenceEnabled())
      {
         return new JournalStorageManager(configuration, executorFactory, shutdownOnCriticalIO);
      }
      return new NullStorageManager();
   }
View Full Code Here

TOP

Related Classes of org.hornetq.core.persistence.impl.journal.JournalStorageManager$TXLargeMessageConfirmationOperation

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.