Examples of PagingStore


Examples of org.hornetq.core.paging.PagingStore

      }
   }

   public void requestProducerCredits(final SimpleString address, final int credits) throws Exception
   {
      PagingStore store = postOffice.getPagingManager().getPageStore(address);

      store.executeRunnableWhenMemoryAvailable(new Runnable()
      {
         public void run()
         {
            callback.sendProducerCreditsMessage(credits, address);
         }
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

         QueueBindingInfo queueInfo = queueInfos.get(queueID);

         if (queueInfo != null)
         {
            SimpleString address = queueInfo.getAddress();
            PagingStore store = pagingManager.getPageStore(address);
            subs = store.getCursorProvier().getSubscription(queueID);
            pageSubscriptions.put(queueID, subs);
         }
      }

      return subs;
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

         QueueBindingInfo queueInfo = queueInfos.get(queueID);

         if (queueInfo != null)
         {
            SimpleString address = queueInfo.getAddress();
            PagingStore store = pagingManager.getPageStore(address);
            subs = store.getCursorProvier().getSubscription(queueID);
            pageSubscriptions.put(queueID, subs);
         }
      }

      return subs;
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore



   private void setPagingStore(final ServerMessage message) throws Exception
   {
      PagingStore store = pagingManager.getPageStore(message.getAddress());

      message.setPagingStore(store);
   }
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

      Transaction tx = context.getTransaction();

      for (Map.Entry<SimpleString, RouteContextList> entry : context.getContexListing().entrySet())
      {
         PagingStore store = pagingManager.getPageStore(entry.getKey());

         if (store.page(message, context, entry.getValue()))
         {
            if (message.isLargeMessage())
            {
               confirmLargeMessageSend(tx, message);
            }
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

      }
   }

   public void requestProducerCredits(final SimpleString address, final int credits) throws Exception
   {
      PagingStore store = postOffice.getPagingManager().getPageStore(address);

      store.executeRunnableWhenMemoryAvailable(new Runnable()
      {
         public void run()
         {
            callback.sendProducerCreditsMessage(credits, address);
         }
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

      MessageProducer prod = sess.createProducer(topic);
      prod.setDeliveryMode(DeliveryMode.PERSISTENT);
      TextMessage txt = sess.createTextMessage("TST");
      prod.send(txt);
     
      PagingStore store = server.getPagingManager().getPageStore(new SimpleString("jms.topic.TT"));

      assertEquals(1024 * 1024, store.getMaxSize());
      assertEquals(10 * 1024, store.getPageSizeBytes());

      jmsServer.stop();

      server = createServer(true, config, PAGE_SIZE, -1, new HashMap<String, AddressSettings>());

View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

      for (int i = 0 ; i < 500; i++)
      {
         prod.send(bmt);
      }
     
      PagingStore store = server.getPagingManager().getPageStore(new SimpleString("jms.queue.Q1"));

      assertEquals(100 * 1024, store.getMaxSize());
      assertEquals(10 * 1024, store.getPageSizeBytes());
      assertEquals(AddressFullMessagePolicy.PAGE, store.getAddressFullMessagePolicy());

      jmsServer.stop();

      server = createServer(true, config, -1, -1, AddressFullMessagePolicy.BLOCK, new HashMap<String, AddressSettings>());

      jmsServer = new JMSServerManagerImpl(server);
      context = new InVMContext();
      jmsServer.setContext(context);
      jmsServer.start();

      AddressSettings settings = server.getAddressSettingsRepository().getMatch("jms.queue.Q1");

      assertEquals(100 * 1024, settings.getMaxSizeBytes());
      assertEquals(10 * 1024, settings.getPageSizeBytes());
      assertEquals(AddressFullMessagePolicy.PAGE, settings.getAddressFullMessagePolicy());

      store = server.getPagingManager().getPageStore(new SimpleString("jms.queue.Q1"));
      assertEquals(100 * 1024, store.getMaxSize());
      assertEquals(10 * 1024, store.getPageSizeBytes());
      assertEquals(AddressFullMessagePolicy.PAGE, store.getAddressFullMessagePolicy());


      server.stop();

   }
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

      SequentialFileFactory factory = new FakeSequentialFileFactory();

      AddressSettings addressSettings = new AddressSettings();
      addressSettings.setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE);

      PagingStore storeImpl = new PagingStoreImpl(PagingStoreImplTest.destinationTestName,
                                                  null,
                                                  100,
                                                  createMockManager(),
                                                  createStorageManagerMock(),
                                                  factory,
                                                  null,
                                                  PagingStoreImplTest.destinationTestName,
                                                  addressSettings,
                                                  getExecutorFactory().getExecutor(),
                                                  true);

      storeImpl.start();

      // this is not supposed to throw an exception.
      // As you could have start being called twice as Stores are dynamically
      // created, on a multi-thread environment
      storeImpl.start();

      storeImpl.stop();

   }
View Full Code Here

Examples of org.hornetq.core.paging.PagingStore

         session.commit();

         session.commit();

         PagingStore store = server.getPagingManager().getPageStore(ADDRESS);
         store.getCursorProvier().cleanup();

         long timeout = System.currentTimeMillis() + 5000;
         while (store.isPaging() && timeout > System.currentTimeMillis())
         {
            Thread.sleep(100);
         }

         // It's async, so need to wait a bit for it happening
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.