Examples of EraseQos


Examples of org.xmlBlaster.client.qos.EraseQos

         bilboCon.unSubscribe("<key oid='" + srq.getSubscriptionId() + "'/>", null);

         System.err.println("->Trying to erase the message at the slave node ...");
         EraseKey ek = new EraseKey(glob, oid);
         ek.setDomain(domain);
         EraseQos eq = new EraseQos(glob);
         EraseReturnQos[] arr = avalonCon.erase(ek.toXml(), eq.toXml());
         assertEquals("Erase", 1, arr.length);
      }
      catch (XmlBlasterException e) {
         e.printStackTrace();
         fail("SubscribeToBilbo-Exception: " + e.toString());
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

    */
   private void doErase(I_XmlBlasterAccess con) {
      log.info("Erasing " + this.oid + " ...");
      try {
         EraseKey eraseKey = new EraseKey(con.getGlobal(), this.oid);
         EraseQos eraseQos = new EraseQos(con.getGlobal());
         eraseQos.setForceDestroy(true);
         EraseReturnQos[] arr = con.erase(eraseKey, eraseQos);
      }
      catch(XmlBlasterException e) {
         log.severe("XmlBlasterException: " + e.getMessage());
         fail(ME+".doErase() failed: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

         isErase = true;
         System.err.println("->Trying to erase the message at the avalon slave node ...");
         EraseKey ek = new EraseKey(glob, oid);
         ek.setDomain(domain);
         EraseQos eq = new EraseQos(glob);
         EraseReturnQos[] arr = avalonCon.erase(ek.toXml(), eq.toXml());
         assertEquals("Erase", 1, arr.length);

         try { Thread.sleep(2000); } catch( InterruptedException i) {}
         assertEquals("message erase event for bilbo", 1, updateCounterBilbo);
         assertTrue(assertInUpdate, assertInUpdate == null);
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

         log.info("Entering tearDown(), test is finished");
         PropString defaultPlugin = new PropString("CACHE,1.0");
         String propName = defaultPlugin.setFromEnv(this.glob, glob.getStrippedId(), null, "persistence", Constants.RELATING_TOPICSTORE, "defaultPlugin");
         log.info("Lookup of propName=" + propName + " defaultValue=" + defaultPlugin.getValue());
         EraseKey eraseKey = new EraseKey(this.glob, "//airport", "XPATH");     
         EraseQos eraseQos = new EraseQos(this.glob);
         con.erase(eraseKey, eraseQos);
      }
      catch (XmlBlasterException ex) {
         ex.printStackTrace();
      }
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

                                Timestamp timestamp, long sizeInBytes,
                                EraseKey eraseKey, EraseQos eraseQos) {
      super(glob, MethodName.ERASE.toString(), priority,
            timestamp, storageId,
            (eraseQos == null) ? false : eraseQos.getData().isPersistent());
      this.eraseQos = (eraseQos == null) ? new EraseQos(glob) : eraseQos;
      this.eraseKey = eraseKey;
      this.immutableSizeInBytes = sizeInBytes;
   }
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

   /**
    * @see I_XmlBlasterAccess#erase(EraseKey, EraseQos)
    */
   public EraseReturnQos[] erase(java.lang.String xmlKey, java.lang.String qos) throws XmlBlasterException {
      return erase(new EraseKey(glob, glob.getQueryKeyFactory().readObject(xmlKey)),
                       new EraseQos(glob, glob.getQueryQosFactory().readObject(qos)) );
   }
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

   /** JMX **/
   public String[] invokeErase(String url, String qos) throws Exception {
      qos = checkQueryKeyQos(url, qos);
      try {
         EraseKey ek = new EraseKey(glob, url);
         EraseReturnQos[] erq = erase(ek, new EraseQos(glob, glob.getQueryQosFactory().readObject(qos)));
         if (erq == null) return new String[0];
         String[] ret = new String[erq.length];
         if (ret.length < 1) {
            return new String[] { "erase('"+url+"') did not match any topic, nothing is erased." };
         }
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

            log.info("UnSubscribed for " + uk.toXml() + "\n" + uq.toXml() + " return:\n" + unSubRet[0].toXml());

            log.info("Hit a key to erase on topic " + oid);
            try { System.in.read(); } catch(java.io.IOException e) {}
            EraseKey ek = new EraseKey(glob, oid);
            EraseQos eq = new EraseQos(glob);
            EraseReturnQos[] er = xmlBlasterAccess.erase(ek, eq);
            log.info("Erased for " + ek.toXml() + "\n" + eq.toXml() + " return:\n" + er[0].toXml());
         }

         int numPublish = 10;
         for (int ii=0; ii<numPublish; ii++) {
            log.info("Hit a key to publish #" + (ii+1) + "/" + numPublish);
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

      }
      finally {
         if (createResponseTopic && responseTopicId.length() == 0) {
            // Clean up temporary topic ...
            EraseKey ek = new EraseKey(glob, responseTopicId);
            EraseQos eq = new EraseQos(glob);
            eq.setForceDestroy(true);
            erase(ek, eq);
         }
      }
   }
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

            String qos = (String)obj[0];
            String key = (String)obj[1];
            return new MsgQueueEraseEntry(glob, PriorityEnum.toPriorityEnum(priority), storageId,
                       new Timestamp(timestamp), sizeInBytes,
                       new EraseKey(glob, glob.getQueryKeyFactory().readObject(key)),
                       new EraseQos(glob, glob.getQueryQosFactory().readObject(qos)) );

         }
         else if (methodName == MethodName.GET) {
            throw new XmlBlasterException(glob, ErrorCode.INTERNAL_NOTIMPLEMENTED, ME, "Object '" + type + "' not implemented, you can't use synchronous GET requests in queues.");
         }
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.