Package org.xmlBlaster.util.queue

Examples of org.xmlBlaster.util.queue.StorageId


      // 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");
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
View Full Code Here


      // 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");
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
View Full Code Here

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

      for (int i=0; i < numOfQueues; i++) {
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "perfomance/Put_" + i);
         this.queues[i] = this.glob.getQueuePluginManager().getPlugin(PLUGIN_TYPES[this.count], "1.0", queueId, prop);
         this.queues[i].clear();
      }

      long t1 = System.currentTimeMillis() - t0;
View Full Code Here

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

      for (int i=0; i < numOfQueues; i++) {
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "perfomance/MultiPut_" + i);
         this.queues[i] = this.glob.getQueuePluginManager().getPlugin(PLUGIN_TYPES[this.count], "1.0", queueId, prop);
         this.queues[i].clear();
      }

      long t1 = System.currentTimeMillis() - t0;
View Full Code Here

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

      for (int i=0; i < numOfQueues; i++) {
         try {
            StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "perfomance/Put_" + i);
            this.queues[i] = this.glob.getQueuePluginManager().getPlugin(PLUGIN_TYPES[i], "1.0", queueId, prop);
            queues[i].clear();
         }
         catch (Exception ex) {
            fail(ME + " exception when constructing the queue object. " + ex.getMessage());
View Full Code Here

         assertEquals(me + " initially the tables should not exist yet", false, hasTables);
         if (log.isLoggable(Level.FINE)) log.fine("going to set up");
         this.manager.setUp();
         StorageId storageId = new StorageId(this.glob, "cb:queue1");
         String queueName = storageId.getStrippedId();

         long size = 100; // entry.getSizeInBytes();
         DummyEntry entry = new DummyEntry(glob, PriorityEnum.NORM_PRIORITY, storageId, size, true);

         try {
View Full Code Here

         toDestroyed();
         return;
      }
     
      if (this.historyReferenceCounter > 0) {
         StorageId st = new StorageId(glob, glob.getDatabaseNodeStr(), Constants.RELATING_HISTORY, "dummy");
         incrementReferenceCounter((-1)*this.historyReferenceCounter, st);
      }
   }
View Full Code Here

   private I_Queue createSubjectQueue(CbQueueProperty prop) throws XmlBlasterException {
      if (prop == null) prop = new CbQueueProperty(glob, Constants.RELATING_SUBJECT, glob.getId());
      String type = prop.getType();
      String version = prop.getVersion();
      StorageId storageId = new StorageId(glob, this.glob.getDatabaseNodeStr(), Constants.RELATING_SUBJECT,
            this.subjectName);
      // old xb_entries:
      // StorageId storageId = new StorageId(glob, Constants.RELATING_SUBJECT,
      // this.subjectName.getAbsoluteName());
      I_Queue queue = glob.getQueuePluginManager().getPlugin(type, version, storageId, prop);
View Full Code Here

    * @param relating
    *           xbType like Constants.RELATING_CLIENT
    * @return
    */
   public StorageId createStorageId(String relating) {
      StorageId storageId = null;
      if (getStorageIdStr() != null && getStorageIdStr().length() > 0) {
         // client code forces a named client side storageId -
         // dangerous if the name conflicts with server name in same DB
         storageId = new StorageId(glob, serverNodeId, relating, getStorageIdStr());
      } else {
         if (getPublicSessionId() == 0) {
            // having no public sessionId we need to generate a unique
            // queue name
            storageId = new StorageId(glob, serverNodeId, relating, getId() + System.currentTimeMillis()
                  + Global.getCounter());
         } else {
            SessionName ses = getSessionName();
            if (ses != null)
               storageId = new StorageId(glob, serverNodeId, relating, ses);
            else
               storageId = new StorageId(glob, serverNodeId, relating, getId() + System.currentTimeMillis()
                     + Global.getCounter());
         }
      }
      return storageId;
   }
View Full Code Here

            this.ME = "XmlBlasterAccess-" + getId();
            setContextNodeId(getServerNodeId());

            try {
               ClientQueueProperty prop = this.connectQos.getClientQueueProperty();
               StorageId storageId = createStorageId(Constants.RELATING_CLIENT);
               this.clientQueue = glob.getQueuePluginManager().getPlugin(prop.getType(), prop.getVersion(), storageId,
                                                      this.connectQos.getClientQueueProperty());
               if (this.clientQueue == null) {
                  String text = "The client queue plugin is not found with this configuration, please check your connect QoS: " + prop.toXml();
                  throw new XmlBlasterException(glob, ErrorCode.USER_CONFIGURATION, ME, text);
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.queue.StorageId

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.