Examples of Node


Examples of net.jmesnil.jmx.core.tree.Node

        return getChildren(parent);
    }

    public Object getParent(Object child) {
        if (child instanceof Node) {
            Node node = (Node) child;
            return node.getParent();
        }
        return null;
    }

Examples of net.kuujo.vertigo.cluster.Node

      public void handle(AsyncResult<Node> result) {
        if (result.failed()) {
          new DefaultFutureResult<ActiveNetwork>(result.cause()).setHandler(doneHandler);
        } else {
          // Once we've selected a node we need to install all the modules to the node.
          final Node node = result.result();
          List<ModuleConfig> modules = new ArrayList<>();
          for (ComponentConfig<?> component : network.getComponents()) {
            if (component.getType().equals(ComponentConfig.Type.MODULE)) {
              modules.add((ModuleConfig) component);
            }
          }

          final CountingCompletionHandler<Void> counter = new CountingCompletionHandler<Void>(modules.size());
          counter.setHandler(new Handler<AsyncResult<Void>>() {
            @Override
            public void handle(AsyncResult<Void> result) {
              if (result.failed()) {
                new DefaultFutureResult<ActiveNetwork>(result.cause()).setHandler(doneHandler);
              } else {
                // Once all the modules have been installed we can deploy the network.
                JsonObject message = new JsonObject()
                    .putString("action", "deploy")
                    .putString("type", "network")
                    .putObject("network", SerializerFactory.getSerializer(Config.class).serializeToObject(network));
                vertx.eventBus().sendWithTimeout(address, message, DEFAULT_REPLY_TIMEOUT, new Handler<AsyncResult<Message<JsonObject>>>() {
                  @Override
                  public void handle(AsyncResult<Message<JsonObject>> result) {
                    if (result.failed()) {
                      new DefaultFutureResult<ActiveNetwork>(new ClusterException(result.cause())).setHandler(doneHandler);
                    } else if (result.result().body().getString("status").equals("error")) {
                      new DefaultFutureResult<ActiveNetwork>(new ClusterException(result.result().body().getString("message"))).setHandler(doneHandler);
                    } else {
                      createActiveNetwork(Contexts.<NetworkContext>deserialize(result.result().body().getObject("context")), doneHandler);
                    }
                  }
                });
              }
            }
          });

          for (ModuleConfig module : modules) {
            node.installModule(module.getModule(), counter);
          }
        }
      }
    });
    return this;

Examples of net.myexperiments.gos.pathfinder.Node

    return world;
  }
 
  public Room(World world) {
    this.world = world;
    room = new Node();
    task = new Task(this);
  }

Examples of net.paoding.analysis.dictionary.support.detection.Node

    List/* <Node> */all = new LinkedList/* <Node> */();
    all.addAll((List/* <Node> */) diff.getDeleted());
    all.addAll((List/* <Node> */) diff.getModified());
    all.addAll((List/* <Node> */) diff.getNewcome());
    for (Iterator iter = all.iterator(); iter.hasNext();) {
      Node node = (Node) iter.next();
      if (node.isFile()) {
        dictionaries.refreshDicWords(node.getPath());
      }
    }
    Knife[] knives = knifeBox.getKnives();
    for (int i = 0; i < knives.length; i ++) {
      Knife knife = knives[i];

Examples of net.percederberg.grammatica.parser.Node

    protected Node exitProductionDeclaration(Production node)
        throws ParseException {

        ProductionPattern             pattern;
        ProductionPatternAlternative  alt;
        Node                          child;

        pattern = (ProductionPattern) getValue(getChildAt(node, 0), 0);
        child = getChildAt(node, 2);
        for (int i = 0; i < child.getValueCount(); i++) {
            alt = (ProductionPatternAlternative) getValue(child, i);
            try {
                pattern.addAlternative(alt);
            } catch (ParserCreationException e) {
                throw new ParseException(

Examples of net.sf.fmj.filtergraph.Node

 
  private void addCodecChainControls(Node node)
  {
    for (int i=0; i<node.getNumDestLinks(); i++)
    {
      Node dest = node.getDestLink(i).getDestNode();
      if ( dest instanceof CodecNode )
      {
        Codec c = ((CodecNode)dest).getCodec();
        final Object[] controls = c.getControls();
        if (controls != null)

Examples of net.sf.jcontracts.dependencyanalyzer.Node

        }
        if (typeName == null)
        {
            typeName = enclosingType.getName();
        }
        Node node = null;
        Enumeration usedTypesEnum = usedTypes_.elements();
        while (usedTypesEnum.hasMoreElements())
        {
            Node usedType = (Node) usedTypesEnum.nextElement();
            if (usedType.getName().equals(typeName))
            {
                node = usedType;
            }
        }

        if (node == null)
        {
            node = new Node(typeName, packagename_, filename_, new Vector());
            usedTypes_.addElement(node);
        }
    }

Examples of net.sf.joafip.store.service.objectfortest.Node

      StoreTooBigForSerializationException {

    /*
     * create a linked list and save it
     */
    final Node node0 = new Node();
    node0.setValue(0);
    final Node node1 = new Node();
    node0.setNext(node1);
    node1.setPrevious(node0);
    node1.setValue(1);
    final Node node2 = new Node();
    node1.setNext(node2);
    node2.setPrevious(node1);
    node2.setValue(2);
    final Node node3 = new Node();
    node2.setNext(node3);
    node3.setPrevious(node2);
    node3.setValue(3);

    RefToNode refToNode = new RefToNode();
    refToNode.setRoot(node0);
    refToNode.setCurrent(node2);

    store.setRoot(refToNode);
    store.save(true, false);

    /*
     * unreference element in list and suppress it from the list, then save
     */
    logger.info("get root");
    refToNode = (RefToNode) store.readAndGetRoot();

    Node current = refToNode.getCurrent();// it is node 2
    Node previous = current.getPrevious(); // it is node 1
    Node next = current.getNext();// it is node 3
    /* node 2 no more referenced */
    refToNode.setCurrent(null);// unreference
    previous.setNext(next);
    next.setPrevious(previous);
    /* add a new object referenced by object modified and detached from root */
    next.setObject(new Object()); // node 3 reference a new object

    store.save(true, false);

    /*
     * check
     */
    logger.info("check if modification saved");

    logger.info("get root");
    refToNode = (RefToNode) store.readAndGetRoot();

    logger.info("root as current");
    current = refToNode.getRoot();// it is node 0
    final DataRecordIdentifier currentIdentifier = getIdentifier(current);
    assertEquals(BAD_VALUE, 0, current.getValue());
    logger.info("get next of current");
    next = current.getNext();// it is node 1
    logger.info("get previous of next");
    previous = next.getPrevious();// it is node 0
    final DataRecordIdentifier previousIdentifier = getIdentifier(current);
    assertEquals("must be same identifier", currentIdentifier,
        previousIdentifier);
    logger.info("current id=" + currentIdentifier);
    assertSame("bad link", current, previous);
    current = next;// it is node 1

    assertEquals(BAD_VALUE, 1, current.getValue());
    next = current.getNext(); // it is node 3
    final Node previousOfNext = next.getPrevious(); // it is node 1
    assertSame("bad link", current, previousOfNext);
    current = next;// it is node 3

    assertEquals(BAD_VALUE, 3, current.getValue());
    next = current.getNext();

Examples of net.sf.katta.node.Node

    assertEquals(1, protocol.getIndices().size());

    int optimumShardDeployCount = SHARD_COUNT * replicationCount;
    assertTrue(optimumShardDeployCount > countShardDeployments(protocol, INDEX_NAME));

    Node node = _miniCluster.startAdditionalNode();
    TestUtil.waitUntilNodeServesShards(protocol, node.getName(), SHARD_COUNT);
    assertTrue(optimumShardDeployCount == countShardDeployments(protocol, INDEX_NAME));
  }

Examples of net.sf.l2j.gameserver.pathfinding.Node

    while (pos != 1)
    {
      int p2 = pos/2;
      if (_list[pos].getCost() <= _list[p2].getCost())
      {
        Node temp = _list[p2];
        _list[p2] = _list[pos];
        _list[pos] = temp;
            pos = p2;
      }
      else
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.