Examples of Node


Examples of com.l2jfrozen.gameserver.geo.pathfinding.Node

   * @return NSWE: 0-15
   */
  @Override
  public Node[] getNeighbors(Node n)
  {
    Node newNode;
    int x = n.getNodeX();
    int y = n.getNodeY();
    int parentdirection = 0;
    if(n.getParent() != null) // check for not adding parent again
    {

Examples of com.linkedin.norbert.cluster.javaapi.Node

    config.setClusterClient(cc);
    NetworkClient nc = new NettyNetworkClient(config, new RoundRobinLoadBalancerFactory());
//    PartitionedNetworkClient<Integer> nc = new NettyPartitionedNetworkClient<Integer>(config, new IntegerConsistentHashPartitionedLoadBalancerFactory());
    nc.registerRequest(NorbertExampleProtos.Ping.getDefaultInstance(), NorbertExampleProtos.PingResponse.getDefaultInstance());

    Node node = cc.getNodeWithId(1);

    Future<Message> f = nc.sendMessageToNode(NorbertExampleProtos.Ping.newBuilder().setTimestamp(System.currentTimeMillis()).build(), node);
    try {
      NorbertExampleProtos.PingResponse response = (NorbertExampleProtos.PingResponse) f.get(750, TimeUnit.MILLISECONDS);
      System.out.println(String.format("Ping took %dms", System.currentTimeMillis() - response.getTimestamp()));

Examples of com.mattibal.meshnet.NetworkTree.Node

 
 
  // Incoming packet handlers
 
  private void onDataToBase(DataToBase data){
    Node node = null;
    if(newTree != null){
      node = newTree.getNodeFromAddress(data.getSourceAddress());
    }
    if(node==null && activeTree != null){
      node = activeTree.getNodeFromAddress(data.getSourceAddress());
    }
    if(node!=null){
      ILayer4 layer4 = node.getLayer4();
      if(layer4 == null){
        layer4 = new Layer4SimpleRpc(node, this);
        node.setLayer4AndAssigned(layer4);
      }
      layer4.onPacketReceived(data);
    }
  }

Examples of com.meidusa.amoeba.sqljep.Node

    Comparable<?> source = runtime.stack.pop();

    if (source == null) {
      return new Comparable<?>[] { (Boolean.FALSE) };
    } else {
      Node arg = node.jjtGetChild(1);
      if (arg instanceof ASTArray) {
        arg.jjtAccept(runtime.ev, null);
        int childSize = arg.jjtGetNumChildren();

        for (int i = 0; i < childSize; i++) {
          Comparable<?> d = runtime.stack.pop();
          if (source instanceof Comparative) {
            Comparative other = (Comparative) source;

Examples of com.metamx.collections.spatial.Node

  @Override
  public Node pickNext(List<Node> nodes, Node[] groups)
  {
    double highestCost = Double.MIN_VALUE;
    Node costlyNode = null;
    int counter = 0;
    int index = -1;
    for (Node node : nodes) {
      double group0Cost = RTreeUtils.getEnclosingArea(node, groups[0]);
      double group1Cost = RTreeUtils.getEnclosingArea(node, groups[1]);

Examples of com.mossle.bpm.graph.Node

                historicActivityInstanceEntity.getId());

        Graph graph = new ActivitiHistoryGraphBuilder(
                historicTaskInstanceEntity.getProcessInstanceId()).build();

        Node node = graph.findById(historicActivityInstanceEntity.getId());

        if (!checkCouldRollback(node)) {
            logger.info("cannot rollback {}", taskId);

            return 2;

Examples of com.neptuny.xgrapher.gen.model.Node

          });
          popup.add(new AbstractAction("Show data") {
            public void actionPerformed(ActionEvent e) {
              System.out.println(v.toString()+" has been selected with right click");
              // convert vertex into XGrapher node
              Node n = mapper.toXGrapher(v);
              // fire event
              app.commBus().fireEvent(XGrapherEventType.NODE_SELECTION,
                  null, n);
            }
          });
          popup.show(vv, e.getX(), e.getY());
        } else {
          final edu.uci.ics.jung.graph.Edge edge = ps.getEdge(e
              .getX(), e.getY());
          if (edge != null) {
            JPopupMenu popup = new JPopupMenu();
            popup.add(new AbstractAction(edge.getUserDatum(GraphAttributeType.NAME).toString()) {
              public void actionPerformed(ActionEvent e) {
                System.out.println("Shown popup of"
                    + edge.toString());
              }
            });
            popup.show(vv, e.getX(), e.getY());

          }
        }

      } else {
        // runs events to manage edge/vertex selection

        Vertex v = ps.getVertex(e.getX(), e.getY());
        if (v != null) {
          // a vertex has been selected
          System.out.println(v.toString());
          // convert vertex into XGrapher node
          Node n = mapper.toXGrapher(v);
          // fire event
          app.commBus().fireEvent(XGrapherEventType.NODE_SELECTION,
              null, n);
        } else {
          edu.uci.ics.jung.graph.Edge jedge = ps.getEdge(e.getX(), e

Examples of com.nokia.dempsy.Dempsy.Application.Cluster.Node

            // wait for it to be received.
            assertTrue(poll(baseTimeoutMillis,mp,new Condition<TestMp>() { @Override public boolean conditionMet(TestMp mp) {  return mp.cloneCalls.get()==3; } }));
            List<Node> nodes = dempsy.getCluster(new ClusterId("test-app","test-cluster1")).getNodes();
            Assert.assertNotNull(nodes);
            Assert.assertTrue(nodes.size()>0);
            Node node = nodes.get(0);
            Assert.assertNotNull(node);
            double duration = ((MetricGetters)node.getStatsCollector()).getPreInstantiationDuration();
            Assert.assertTrue(duration>0.0);
         }
        
         public String toString() { return methodName; }
        

Examples of com.ojn.gexf4j.core.Node

    Attribute attFrog = attrListStatic.createAttribute("1", AttributeType.BOOLEAN, "frog")
      .setDefaultValue("true");
   
    Attribute attIndegree = attrListDynamic.createAttribute("2", AttributeType.FLOAT, "indegree");
   
    Node gephi = gexf.getGraph().createNode("0");
    gephi
      .setLabel("Gephi")
      .setStartDate(toDate("2009-03-01"))
      .getAttributeValues()
        .addValue(attUrl, "http://gephi.org")
        .addValue(attIndegree, "1");
   
    Node webatlas = gexf.getGraph().createNode("1");
    webatlas
      .setLabel("Webatlas")
      .getAttributeValues()
        .addValue(attUrl, "http://webatlas.fr");
     
    webatlas.getAttributeValues().createValue(attIndegree, "1")
      .setEndDate(toDate("2009-03-01"));
    webatlas.getAttributeValues().createValue(attIndegree, "2")
      .setStartDate(toDate("2009-03-01"))
      .setEndDate(toDate("2009-03-10"));
    webatlas.getAttributeValues().createValue(attIndegree, "1")
      .setStartDate(toDate("2009-03-10"));
     
    Node rtgi = gexf.getGraph().createNode("2");
    rtgi
      .setLabel("RTGI")
      .getAttributeValues()
        .addValue(attUrl, "http://rtgi.fr");
   
    rtgi.getAttributeValues().createValue(attIndegree, "0")
      .setEndDate(toDate("2009-03-01"));
    rtgi.getAttributeValues().createValue(attIndegree, "1")
      .setStartDate(toDate("2009-03-01"));
   
    rtgi.getSlices().add(new SliceImpl()
      .setEndDate(toDate("2009-03-01")));
    rtgi.getSlices().add(new SliceImpl()
      .setStartDate(toDate("2009-03-05"))
      .setEndDate(toDate("2009-03-10")));
   
    Node blab = gexf.getGraph().createNode("3");
    blab
      .setLabel("BarabasiLab")
      .getAttributeValues()
        .addValue(attUrl, "http://barabasilab.com")
        .addValue(attFrog, "false");
       
    blab.getAttributeValues().createValue(attIndegree, "0")
      .setEndDate(toDate("2009-03-01"));
    blab.getAttributeValues().createValue(attIndegree, "1")
      .setStartDate(toDate("2009-03-01"));
   
    gephi.connectTo("0", webatlas)
      .setStartDate(toDate("2009-03-01"));
   

Examples of com.oltpbenchmark.benchmarks.jpab.objects.Node

    protected TestEntity newEntity() {
        int treeId = lastTreeId.incrementAndGet();
        Node[] nodes = new Node[GRAPH_SIZE + 1];
        for (int nodeIx = 1; nodeIx <= GRAPH_SIZE; nodeIx++)
        {
            Node node = new Node(treeId * GRAPH_SIZE + nodeIx);
            nodes[nodeIx] = node;
            int parentIx = nodeIx >> 1;
            if (parentIx > 0) {
                if ((nodeIx % 2) == 0) {
                    nodes[parentIx].setChild1(node);
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.