Examples of NodeId


Examples of org.tmatesoft.hg.core.Nodeid

  private void checkFileSneakerPerformance() throws Exception {
    HgChangesetFileSneaker fs1 = new HgChangesetFileSneaker(hgRepo);
    HgChangesetFileSneaker fs2 = new HgChangesetFileSneaker(hgRepo);
    fs1.followRenames(true);
    fs2.followRenames(true);
    Nodeid cset = hgRepo.getChangelog().getRevision(2);
    Path fname = Path.create("dir9/file9"); // close to the manifest end
    fs1.changeset(cset);
    fs2.changeset(cset);
//    hgRepo.getManifest().getFileRevision(TIP, fname);
    final long start1 = System.nanoTime();
    boolean e1 = fs1.checkExists(fname);
    final long end1 = System.nanoTime();
    boolean e2 = fs2.checkExists(fname);
    final long end2 = System.nanoTime();
    Nodeid fr = hgRepo.getManifest().getFileRevision(TIP, fname);
    final long end3 = System.nanoTime();
    System.out.printf("\t1st run: %d ms, %b\n\t2nd run: %d ms, %b\n\tfile only: %d ms", (end1 - start1) / 1000000, e1, (end2 - end1) / 1000000, e2, (end3-end2)/1000000);
    if (!fr.equals(fs1.revision()) || !fr.equals(fs2.revision())) {
      throw new AssertionError();
    }
    ManifestRevision mr = new ManifestRevision(null, null);
    final long _s1 = System.nanoTime();
    hgRepo.getManifest().walk(0, 0, mr);
View Full Code Here

Examples of org.uiautomation.ios.wkrdp.model.NodeId

    if (params.has("node")) {
      params = params.getJSONObject("node");
    }
    int nodeId = params.getInt("nodeId");

    this.node = new NodeId(nodeId);
    this.parent = new NodeId(parentNodeId);

  }
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

   }

   public final void setId(String id) {
      super.setId(id);
      if (id == null) return;
      this.nodeId = new NodeId(id); // ContextNode should replace NodeId one day
      this.contextNode = new ContextNode(ContextNode.CLUSTER_MARKER_TAG, getStrippedId(), (ContextNode)null);
   }
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

                  }
                  id = id.trim();
                  if (this.clusterManager != null) {
                     this.tmpClusterNode = this.clusterManager.getClusterNode(id);
                     if (this.tmpClusterNode == null) {
                        this.tmpClusterNode = new ClusterNode(glob, new NodeId(id), sessionInfo);
                        this.clusterManager.addClusterNode(this.tmpClusterNode);
                     }
                  }
               }
               return;
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

            "   </master>\n" +
            "</clusternode>\n";

         {
            System.out.println("\nmaster message from client ...");
            NodeParser nodeParser = new NodeParser(glob, new ClusterNode(glob, new NodeId("heron.mycomp.com"), null), xml);
            System.out.println(nodeParser.getClusterNode().toXml());
         }

         xml =
            "<clusternode id='heron.mycomp.com'>\n" +
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

      this.strippedId = Global.getStrippedString(this.id);
   }

   // Parse old xb_entries.queueName
   private final void splitPostfix(String post) {
      NodeId nodeId = this.glob.getNodeId();
      if (nodeId != null)
         this.xbStore.setNode(nodeId.getId());
      String relating = this.xbStore.getType();
      if (Constants.RELATING_CALLBACK.equals(relating) || Constants.RELATING_SUBJECT.equals(relating)) {
         //callback_nodemarcelclientsubscriber1  | UPDATE_REF
         // /node/heron/client/joe/session/1 (from SessionName)
         // subject_nodeheronclientsubscriberDummy
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

      catch (IllegalArgumentException e) {
         fail("testParse failed: " + e.toString());
      }

      try { // Test given node ID ...
         SessionName tmp = new SessionName(glob, new NodeId("avalon"), "client/jack");
         SessionName sessionName = new SessionName(glob, tmp, -4);
         System.out.println("AbsoluteName=" + sessionName.getAbsoluteName() + " RelativeName=" + sessionName.getRelativeName());
         if (SessionName.useSessionMarker())
            assertEquals("Expected /node/avalon/client/jack/session/-4 but was:" + sessionName.getAbsoluteName(), "/node/avalon/client/jack/session/-4", sessionName.getAbsoluteName());
         else
            assertEquals("Expected /node/avalon/client/jack/-4 but was:" + sessionName.getAbsoluteName(), "/node/avalon/client/jack/-4", sessionName.getAbsoluteName());
         assertEquals("", "avalon", sessionName.getNodeId().getId());
         if (SessionName.useSessionMarker())
            assertEquals("", "client/jack/session/-4", sessionName.getRelativeName());
         else
            assertEquals("", "client/jack/-4", sessionName.getRelativeName());
         assertEquals("", "jack", sessionName.getLoginName());
         assertEquals("", -4L, sessionName.getPublicSessionId());
      }
      catch (IllegalArgumentException e) {
         fail("testParse failed: " + e.toString());
      }

      try { // Test given node ID ...
         SessionName tmp = new SessionName(glob, new NodeId("/node/avalon"), "client/jack");
         SessionName sessionName = new SessionName(glob, tmp, -4);
         System.out.println("AbsoluteName=" + sessionName.getAbsoluteName() + " RelativeName=" + sessionName.getRelativeName());
         if (SessionName.useSessionMarker())
            assertEquals("", "/node/avalon/client/jack/session/-4", sessionName.getAbsoluteName());
         else
            assertEquals("", "/node/avalon/client/jack/-4", sessionName.getAbsoluteName());
         assertEquals("", "avalon", sessionName.getNodeId().getId());
         if (SessionName.useSessionMarker())
            assertEquals("", "client/jack/session/-4", sessionName.getRelativeName());
         else
            assertEquals("", "client/jack/-4", sessionName.getRelativeName());
         assertEquals("", "jack", sessionName.getLoginName());
         assertEquals("", -4L, sessionName.getPublicSessionId());
      }
      catch (IllegalArgumentException e) {
         fail("testParse failed: " + e.toString());
      }

      try { // Test given node ID ...
         SessionName sessionName = new SessionName(glob, new NodeId("/node/sauron/client/jack/99"), "/node/heron/client/jack/99");
         System.out.println("AbsoluteName=" + sessionName.getAbsoluteName() + " RelativeName=" + sessionName.getRelativeName());
         if (SessionName.useSessionMarker())
            assertEquals("", "/node/sauron/client/jack/session/99", sessionName.getAbsoluteName());
         else
            assertEquals("", "/node/sauron/client/jack/99", sessionName.getAbsoluteName());
         assertEquals("", "sauron", sessionName.getNodeId().getId());
         if (SessionName.useSessionMarker())
            assertEquals("", "client/jack/session/99", sessionName.getRelativeName());
         else
            assertEquals("", "client/jack/99", sessionName.getRelativeName());
         assertEquals("", "jack", sessionName.getLoginName());
         assertEquals("", 99L, sessionName.getPublicSessionId());
      }
      catch (IllegalArgumentException e) {
         fail("testParse failed: " + e.toString());
      }
        
      try { // Test given node ID ...
         new SessionName(glob, new NodeId("/avalon"), "client/jack");
         fail("testParse failed, nodeId is invalid.");
      }
      catch (IllegalArgumentException e) {
         System.out.println("SUCCESS: " + e.toString());
      }
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

          + "   socket://:7501"
          + "</address>"
          + "</qos></connect>"
          + "   </clusternode>";
         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         Address address = nodeParser.getClusterNode().getNodeInfo()
               .getConnectQosData().getAddress();
         log.info("Address='" + address.getRawAddress().trim() + "'");
         assertEquals("socket://:7501", address.getRawAddress().trim());
      } catch (XmlBlasterException e) {
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

            + "   <attribute name='useRemoteLoginAsTunnel'>true</attribute>"
            + "</address>"
            + "</qos></connect>"
            + "</clusternode>";
         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         log.info(nodeParser.getClusterNode().toXml());
         Address address = nodeParser.getClusterNode().getNodeInfo()
               .getConnectQosData().getAddress();
         log.info("Address='" + address.getRawAddress().trim() + "'");
         assertEquals("socket://:7501", address.getRawAddress().trim());
View Full Code Here

Examples of org.xmlBlaster.util.cluster.NodeId

            "     <ram free='12000'/>\n" +
            "   </state>\n" +
            "</clusternode>\n";

         NodeParser nodeParser = new NodeParser(serverScope, new ClusterNode(
               serverScope, new NodeId("avalon"), null), xml);
         ClusterNode clusterNode = nodeParser.getClusterNode();
         log.info(clusterNode.toXml());
        
         Address address = clusterNode.getNodeInfo()
               .getConnectQosData().getAddress();
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.