Package org.xmlBlaster.util.qos.storage

Examples of org.xmlBlaster.util.qos.storage.CbQueueProperty


//      try {
         for (int ic=0; ic < maxNumOfBytesCache.length; ic++) {
            for (int is=0; is < maxNumOfBytes.length; is++) {
               log.info("**** TEST maxNumOfBytesCache["+ic+"]=" + maxNumOfBytesCache[ic] + " maxNumOfBytes["+is+"]=" + maxNumOfBytes[is]);
               // a new queue each time here ...
               QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
               prop.setMaxEntries(2000L);
               prop.setMaxEntriesCache(1000L);
               prop.setMaxBytes(maxNumOfBytes[is]);
               prop.setMaxBytesCache(maxNumOfBytesCache[ic]);
               StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "CacheQueueTest/jdbc" + maxNumOfBytes[is] + "/ram" + maxNumOfBytesCache[ic]);

//               this.queue = new CacheQueueInterceptorPlugin();
               refQueue.clear();
               refQueue.shutdown();
View Full Code Here


      // set up the queues ....
      long maxNumOfBytesCache = 10000L;
      long maxNumOfBytes = 50000L;
      long entrySize = 100L;

      QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
      prop.setMaxEntries(2000L);
      prop.setMaxEntriesCache(1000L);
      prop.setMaxBytes(maxNumOfBytes);
      prop.setMaxBytesCache(maxNumOfBytesCache);
      StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "CacheQueueTest/jdbc" + maxNumOfBytes + "/ram" + maxNumOfBytesCache);
      this.queue.clear();
      this.queue.shutdown();
      this.queue.initialize(queueId, prop);
View Full Code Here

            AddressBase addr = addrArr[0];
            assertEquals("", "34", addr.getEnv("intKey2", "").getValue());
         }

         {
            CbQueueProperty prop = qos.getSubjectQueueProperty();
            assertEquals("", 1009L, prop.getMaxEntries());
            assertEquals("", "XY", prop.getType());
            assertEquals("", "7.0", prop.getVersion());
            assertEquals("", 4009L, prop.getMaxBytes());
            assertEquals("", 509L, prop.getMaxEntriesCache());
            assertEquals("", 777L, prop.getMaxBytesCache());
            /* Currently deactivated in code
            assertEquals("", 20009L, prop.getStoreSwapLevel());
            assertEquals("", 10000L, prop.getStoreSwapBytes());
            assertEquals("", 20000L, prop.getReloadSwapLevel());
            assertEquals("", 30000L, prop.getReloadSwapBytes());
            */
            assertEquals("", "deadMessage", prop.getOnOverflow());
            assertEquals("", true, qos.hasSubjectQueueProperty());
         }


         {
            CbQueueProperty prop = qos.getSessionCbQueueProperty();
            assertEquals("", 1600L, prop.getMaxEntries());
            AddressBase[] addrArr = prop.getAddresses();
            assertEquals("Address array", 1, addrArr.length);
            AddressBase addr = addrArr[0];
            assertEquals("", 400, addr.getCollectTime());
            assertEquals("", 12, addr.getBurstModeMaxEntries());
            assertEquals("", 24, addr.getBurstModeMaxBytes());
View Full Code Here

         qos = factory.readObject(newXml);             // parse again

         if (log.isLoggable(Level.FINE)) log.fine("ORIG=\n" + xml + "\n NEW=\n" + newXml);

         {
            CbQueueProperty prop = qos.getSessionCbQueueProperty();
            assertEquals("", 1600L, prop.getMaxEntries());
            assertEquals("", 2000L, prop.getMaxBytes());
            AddressBase[] addrArr = prop.getAddresses();
            assertEquals("Address array", 1, addrArr.length);
            AddressBase addr = addrArr[0];
            assertEquals("", "golan@localhost", addr.getRawAddress());
            assertEquals("", "/xmlBlaster/node/heron/client/golan/session/1", addr.getEnv("__ContextNode", "").getValue());
            assertEquals("", "email", addr.getType());
View Full Code Here

         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");
         java.util.Properties prop = (java.util.Properties)pluginInfo.getParameters();
         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");

         CbQueueProperty cbProp = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "SetupQueue");

         this.queue = pluginManager.getPlugin(pluginInfo, queueId, cbProp);
         this.queue.shutdown(); // to allow to initialize again
      }
View Full Code Here

   }

   public void putWithBreak() throws XmlBlasterException {
      String me = ME + ".putWithBreak";
      // set up the queues ....
      QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
      prop.setMaxEntries(10000);
      StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "putWithBreak");
      queue.initialize(queueId, prop);
      queue.clear();

      int num = 30;
View Full Code Here

   }

   public void initialEntries() throws XmlBlasterException {
      // set up the queues ....
      log.info("initialEntries test starts");
      QueuePropertyBase cbProp = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
      cbProp.setMaxEntries(10000L);
      cbProp.setMaxBytes(200000L);
      StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "initialEntries");

      try {
         String type = PLUGIN_TYPES[this.count];
         this.glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
View Full Code Here

   }

   public void multiplePut() throws XmlBlasterException {
      // set up the queues ....
      log.info("initialEntries test starts");
      QueuePropertyBase cbProp = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
      cbProp.setMaxEntries(10000L);
      cbProp.setMaxBytes(200000L);
      StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "initialEntries");

      try {
         String type = PLUGIN_TYPES[this.count];
         this.glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
View Full Code Here

   public void performancePut(int numOfQueues, int numOfMsg, int sizeOfMsg)
      throws XmlBlasterException {

      // set up the queues ....
      this.queues = new I_Queue[numOfQueues];
      QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
      log.info("performancePut: number of queues: " + numOfQueues + ", number of messages per queue: " + numOfMsg + ", size of each message: " + sizeOfMsg);

      prop.setMaxEntries(numOfMsg + 1);

      log.info("starting setting up " + numOfQueues + " queues");
      long t0 = System.currentTimeMillis();

      for (int i=0; i < numOfQueues; i++) {
View Full Code Here

   public void performanceMultiPut(int numOfQueues, int numOfMsg, int sizeOfMsg)
      throws XmlBlasterException {

      // set up the queues ....
      this.queues = new I_Queue[numOfQueues];
      QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");

      prop.setMaxEntries(numOfMsg + 1);

      log.info("starting setting up " + numOfQueues + " queues");
      long t0 = System.currentTimeMillis();

      for (int i=0; i < numOfQueues; i++) {
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.qos.storage.CbQueueProperty

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.