Package org.xmlBlaster.util.queue

Examples of org.xmlBlaster.util.queue.StorageId


      try {
         {
            log.fine("start test");
            int msgSize = 1000000;
           
            StorageId storageId = new StorageId(glob, "mystore", "test");
            byte[] content = new byte[msgSize];
            MsgUnit msgUnit = new MsgUnit(this.glob, "<key oid='aaa'/>", content, "<qos/>");
            MsgQueuePublishEntry pubEntry = new MsgQueuePublishEntry(this.glob, msgUnit, storageId);
            queue.put(pubEntry, false);
            I_Entry entry = queue.peek();
View Full Code Here


         QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
         prop.setMaxEntries(1L);
         prop.setMaxEntriesCache(1L);
        
         queueType = this.queue.toString();
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "QueuePlugin/testOverflow");
         this.queue.initialize(queueId, prop);
         queue.clear();
         assertEquals(ME + " wrong size before starting ", 0, queue.getNumOfEntries());
         overflow(this.queue);
      }
View Full Code Here

    * - Timestamp
    * - MsgQueueUpdateEntry
    */
   public void updateEntry() {
      log.info("************ Starting updateEntry " + System.getProperty("java.vm.vendor") + ": " + System.getProperty("java.vm.version"));
      StorageId storageId = new StorageId(glob, Constants.RELATING_CALLBACK, "updateEntry");
      try {
         SessionName receiver = new SessionName(glob, "receiver1");
         PublishQosServer publishQosServer = new PublishQosServer(glob, "<qos/>");
         MsgUnit msgUnit = new MsgUnit(glob, "<key oid='XX'/>", new byte[0], publishQosServer.toXml());
         org.xmlBlaster.engine.ServerScope global = new org.xmlBlaster.engine.ServerScope();
View Full Code Here

    * - MsgQueueUpdateEntry
    * </pre>
    */
   public void historyEntry() {
      log.info("************ Starting historyEntry " + System.getProperty("java.vm.vendor") + ": " + System.getProperty("java.vm.version"));
      StorageId storageId = new StorageId(glob, Constants.RELATING_HISTORY, "historyEntry");
      try {
         PublishQosServer publishQosServer = new PublishQosServer(glob, "<qos/>");
         MsgUnit msgUnit = new MsgUnit(glob, "<key oid='XX'/>", new byte[0], publishQosServer.toXml());
         org.xmlBlaster.engine.ServerScope global = new org.xmlBlaster.engine.ServerScope();
         MsgUnitWrapper msgWrapper = new MsgUnitWrapper(glob, msgUnit, storageId);
View Full Code Here

    */
   public void msgUnitWrapperEntry() {
      log.info("************ Starting msgUnitWrapperEntry " + System.getProperty("java.vm.vendor") + ": " + System.getProperty("java.vm.version"));
      try {
         PublishQosServer publishQosServer = new PublishQosServer(glob, "<qos/>");
         StorageId storageId = new StorageId(glob, Constants.RELATING_MSGUNITSTORE, "msgUnitWrapperEntry");

         int step = 1000;
         int numCreate = 1000000;
         MsgUnitWrapper entryArr[] = new MsgUnitWrapper[numCreate];
         log.info("Hit a key for new MsgUnitWrapper RAM size test ...");
View Full Code Here

    */
   public void publishEntry() {
      log.info("************ Starting publishEntry " + System.getProperty("java.vm.vendor") + ": " + System.getProperty("java.vm.version"));
      try {
         PublishQos publishQos = new PublishQos(glob);
         StorageId storageId = new StorageId(glob, Constants.RELATING_CLIENT, "publishEntry");

         int step = 1000;
         int numCreate = 1000000;
         MsgQueuePublishEntry entryArr[] = new MsgQueuePublishEntry[numCreate];
         log.info("Hit a key for new MsgQueuePublishEntry RAM size test ...");
View Full Code Here

    * </pre>
    */
   public void subscribeEntry() {
      log.info("************ Starting subscribeEntry " + System.getProperty("java.vm.vendor") + ": " + System.getProperty("java.vm.version"));
      try {
         StorageId storageId = new StorageId(glob, Constants.RELATING_CLIENT, "subscribeEntry");

         int step = 1000;
         int numCreate = 1000000;
         MsgQueueSubscribeEntry entryArr[] = new MsgQueueSubscribeEntry[numCreate];
         log.info("Hit a key for new MsgQueueSubscribeEntry RAM size test ...");
View Full Code Here

    * </pre>
    */
   public void connectEntry() {
      log.info("************ Starting connectEntry " + System.getProperty("java.vm.vendor") + ": " + System.getProperty("java.vm.version"));
      try {
         StorageId storageId = new StorageId(glob, Constants.RELATING_CLIENT, "connectEntry");

         int step = 1000;
         int numCreate = 1000000;
         MsgQueueConnectEntry entryArr[] = new MsgQueueConnectEntry[numCreate];
         log.info("Hit a key for new MsgQueueConnectEntry RAM size test ...");
View Full Code Here

         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
      }
      catch (Exception ex) {
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;
      boolean success = false;
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.